CBFalconer wrote:
Adriaan van Os wrote:
... snip ...
TEST fjf31.pas: failed: 2, 2, 1
TEST pack1.pas: failed
TEST systemtest.pas: *** malloc: vm_allocate(size=2147483648) failed
Of course it did. malloc of that size would require a sbrk with a negative size (even though sbrk is specified to take an unsigned). That would reduce the heap space available, and create havoc.
Yes, it will fail, but it should return a nil pointer then, rather than aborting the program and writing an error on its own. AFAIK, that's the required behaviour in standard C (which makes sense -- imagine an interactive program or a long calculation just aborted, without giving the programmer any chance to clean up). And that's just what this test tests. Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707