Frank Heckenbach wrote:
BTW, was it a soft or hard limit? GPC contains code that should eliminate the former, but of course, it's helpless against the latter. Anyway, a certain amount of stack usage for large programs probably just has to be accepted (note that the respective tests are actually quite large programs, despite their apparent file sizes, due to heavy use of macros etc.).
It's a soft limit, that defaults to 512 KB. The hard limit defaults to 64 MB.
It's remarkable that the crashes are reported as EXC_BAD_ACCESS (0x0001) code KERN_INVALID_ADDRESS, not as stack overflow. I could do some debugging with GDB to see what’s happening. Actually, debugging GPC programs with GDB on Mac OS X seems to work.
You're right. The test was meant to check the behaviour of some routine in an out-of-memory situation, but the way to reproduce this situation was poor.
The new systemtest.pas give me this:
[G4:~/gnu/testgpc/test] adriaan% make MASK="systemtest.pas"
TEST systemtest.pas: *** malloc: vm_allocate(size=2147483648) failed with 3 *** malloc[1412]: error: Can't allocate region *** malloc: vm_allocate(size=2147483648) failed with 3 *** malloc[1412]: error: Can't allocate region OK
Regards,
Adriaan van Os