mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
This causes problems on setups where ld.so is mapped at just over 1M:
it zeroes out that area (as a result of one of the mmaps) and the program consequently goes into an infinite loop. Change the map sizes to just one page to avoid that. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5616
This commit is contained in:
parent
eeb7eaa4e1
commit
c2a48e3498
@ -11,25 +11,25 @@
|
||||
int main(void)
|
||||
{
|
||||
/* mmap(0x0, ... FIXED) should fail */
|
||||
int* m = mmap(0x0, 1000000, PROT_READ|PROT_WRITE,
|
||||
int* m = mmap(0x0, 4096, PROT_READ|PROT_WRITE,
|
||||
MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0);
|
||||
if (m != (int*)-1)
|
||||
printf("succeeded?!\n");
|
||||
|
||||
/* mmap(0x1000, ... FIXED) should fail */
|
||||
m = mmap((void*)0x1000, 1000000, PROT_READ|PROT_WRITE,
|
||||
m = mmap((void*)0x1000, 4096, PROT_READ|PROT_WRITE,
|
||||
MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0);
|
||||
if (m != (int*)-1)
|
||||
printf("succeeded?!\n");
|
||||
|
||||
/* mmap(0xa000, ... FIXED) should fail */
|
||||
m = mmap((void*)0xa000, 1000000, PROT_READ|PROT_WRITE,
|
||||
m = mmap((void*)0xa000, 4096, PROT_READ|PROT_WRITE,
|
||||
MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0);
|
||||
if (m != (int*)-1)
|
||||
printf("succeeded?!\n");
|
||||
|
||||
/* mmap(0x10000, ... FIXED) should fail */
|
||||
m = mmap((void*)0x10000, 1000000, PROT_READ|PROT_WRITE,
|
||||
m = mmap((void*)0x10000, 4096, PROT_READ|PROT_WRITE,
|
||||
MAP_PRIVATE|MAP_ANON|MAP_FIXED, -1, 0);
|
||||
if (m == (int*)-1)
|
||||
printf("failed?!\n");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user