mirror of
https://github.com/facebookexperimental/reverie.git
synced 2024-11-24 04:09:38 +00:00
hermetic_infra
Reviewed By: jasonwhite Differential Revision: D64105413 fbshipit-source-id: 0d3a27a9a3d9deeaa545e42b9e2d96ed307d5c18
This commit is contained in:
parent
3bd4cffb7b
commit
a455a6b619
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue