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;
}
This test passes on Linux, however causes a segfault in Chronos. Reproducer program (malloc test in testsuite):