Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a syscall implementation for llseek #1640

Merged
merged 16 commits into from
Mar 30, 2020
Merged
2 changes: 1 addition & 1 deletion manticore/native/cpu/abstractcpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def read_int(self, where, size=None, force=False):
self._publish("did_read_memory", where, value, size)
return value

def write_bytes(self, where, data, force=False):
def write_bytes(self, where: int, data, force: bool = False) -> None:
"""
Write a concrete or symbolic (or mixed) buffer to memory

Expand Down
6 changes: 4 additions & 2 deletions manticore/platforms/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ def sys_getcwd(self, buf, size):
except OSError as e:
return -e.errno

def sys_lseek(self, fd, offset, whence):
def sys_lseek(self, fd: File, offset: int, whence: int) -> int:
"""
lseek - reposition read/write file offset

Expand All @@ -1345,7 +1345,9 @@ def sys_lseek(self, fd, offset, whence):
)
return -e.err

def sys_llseek(self, fd, offset_high, offset_low, resultp, whence):
def sys_llseek(
self, fd: File, offset_high: int, offset_low: int, resultp: int, whence: int
ekilmer marked this conversation as resolved.
Show resolved Hide resolved
) -> int:
"""
_llseek - reposition read/write file offset

Expand Down