From a455a6b6194afc2a0ced1025a5124369a06430ee Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Wed, 9 Oct 2024 17:24:28 -0700 Subject: [PATCH] hermetic_infra Reviewed By: jasonwhite Differential Revision: D64105413 fbshipit-source-id: 0d3a27a9a3d9deeaa545e42b9e2d96ed307d5c18 --- scripts/dump-vdso.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dump-vdso.py b/scripts/dump-vdso.py index bdf7fd2..45ad7da 100755 --- a/scripts/dump-vdso.py +++ b/scripts/dump-vdso.py @@ -22,14 +22,14 @@ import sys from typing import List, Optional -def dump_vdso() -> Optional[List[ctypes.c_ubyte]]: +def dump_vdso() -> list[ctypes.c_ubyte] | None: """ Returns a list containing the VDSO. """ with open("/proc/self/maps") as f: for line in f: if "[vdso]" in line: - start, end = [int(x, 16) for x in line.split(" ")[0].split("-")] + start, end = (int(x, 16) for x in line.split(" ")[0].split("-")) length = end - start return (ctypes.c_ubyte * length).from_address(start)