Remove assertion on brk()

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.
This commit is contained in:
Pierre Pronchery 2018-04-06 03:22:00 +02:00
parent 0fc4bba9ad
commit 4276bd5c7c

View File

@ -1310,7 +1310,6 @@ class Linux(Platform):
- "Error in brk!" if there is any error allocating the memory
'''
if brk != 0 and brk != self.elf_brk:
assert brk > self.elf_brk
mem = self.current.memory
size = brk - self.elf_brk
perms = mem.perms(self.elf_brk - 1)