Skip to content

Commit

Permalink
hermetic_infra
Browse files Browse the repository at this point in the history
Reviewed By: jasonwhite

Differential Revision: D64105413

fbshipit-source-id: 0d3a27a9a3d9deeaa545e42b9e2d96ed307d5c18
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Oct 10, 2024
1 parent 3bd4cff commit a455a6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/dump-vdso.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
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)

Expand Down

0 comments on commit a455a6b

Please sign in to comment.