Open jdetter opened 8 years ago
This test passes on Linux, however causes a segfault in Chronos. Reproducer program (malloc test in testsuite):
#include <stdlib.h> #include <testsuite.h> #define COUNT 0x10000 #define ALLOC_SIZE 0x1000 int main(int argc, char** argv) { int* arr[COUNT]; int x; for(x = 0;x < COUNT;x++) { arr[x] = malloc(ALLOC_SIZE); if(!arr[x]) TESTFAILURE; } for(x = 0;x < COUNT;x++) free(arr[x]); for(x = 0;x < COUNT;x++) { arr[x] = malloc(ALLOC_SIZE); if(!arr[x]) TESTFAILURE; } for(x = 0;x < COUNT;x++) free(arr[x]); TESTSUCCESS; return 0; }
Lowering count from 0x10000 to 0x1000 passes. Could be issue with sbrk or brk (whichever is being used).
0x10000
0x1000
sbrk
brk
This test passes on Linux, however causes a segfault in Chronos. Reproducer program (malloc test in testsuite):