Remove assertion on brk() (#860)
Manticore assumed that new calls to brk(2) were always increasing the size of the data segment. This is not always true, since programs may decide to reduce it as well. Tested with a static Linux/i386 program on macOS/amd64. (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/mmap.c?h=v4.17-rc1#n226)
This commit is contained in:
parent
2814723cc8
commit
71bf5d4f11
@ -1310,7 +1310,6 @@ class Linux(Platform):
|
|||||||
- "Error in brk!" if there is any error allocating the memory
|
- "Error in brk!" if there is any error allocating the memory
|
||||||
'''
|
'''
|
||||||
if brk != 0 and brk != self.elf_brk:
|
if brk != 0 and brk != self.elf_brk:
|
||||||
assert brk > self.elf_brk
|
|
||||||
mem = self.current.memory
|
mem = self.current.memory
|
||||||
size = brk - self.elf_brk
|
size = brk - self.elf_brk
|
||||||
perms = mem.perms(self.elf_brk - 1)
|
perms = mem.perms(self.elf_brk - 1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user