Waldek Hebisch wrote:
Adriaan van Os wrote:
The result of systemtest.pas is interesting. With previous versions of gpc the output (caused by a bug in Mac OS X) was:
TEST systemtest.pas: *** malloc: vm_allocate(size=2147483648) failed (error code=3) *** malloc[10229]: error: Can't allocate region *** malloc: vm_allocate(size=2147483648) failed (error code=3) *** malloc[10229]: error: Can't allocate region OK
Now we get:
TEST systemtest.pas: ./test_run: line 345: 10339 Segmentation fault ./"$A_OUT" "$1"
with backtrace;
Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0x000e203c
Thread 0 Crashed: 0 a.out 0x0001d614 _p_FileHandle + 0x4 (files.pas:1015) 1 a.out 0x00005120 _p_WriteErrorMessage + 0x12c (error.pas:750) 2 a.out 0x000053fc _p__rts_Error_S24_Writestackdump + 0x2cc (error.pas:772) 3 a.out 0x00005df4 _p_EndRuntimeError + 0x38 (error.pas:862) 4 a.out 0x00005f00 _p__rts_Error_S32_Strerror + 0 (error.pas:875) 5 a.out 0x00004338 _p_IORangeCheckError + 0 (error.pas:585) 6 a.out 0x000161f0 _p__rts_Heap_S6_Addtomarklist + 0 (heap.pas:203) 7 a.out 0x00016458 _p_New + 0x4c (heap.pas:251) 8 a.out 0x00003f84 _p__M0_main_program + 0x3f8 (systemtest.pas:42) 9 a.out 0x0000413c main + 0x34 (<implicit code>:59) 10 a.out 0x00002140 _start + 0x188 (crt.c:267) 11 dyld 0x8fe1a558 _dyld_start + 0x64
That looks like error in runtime system. Did you re-built `libgpc.a'? Re-making after applying patch will _not_ re-make `libgpc.a', one has to remove object files in `gcc/p/rts/' subdirectory by hand (including `stamp-error-gpi').
Or just `make clean' in that directory. And possibly `rm -rf <build>/gcc/p/utils' to rebuild the utilities (if you care about them).
Somehow the given line numbers really don't match, something's strange here. If you're sure the RTS was rebuilt, please try rebuilding it again without optimization (CFLAGS=-O0). Sometimes optimization distorts the debug traces quite a bit. Of course, if you're (un)lucky, changing the optimization will also make the bugs disappear, we will see ...
Frank