Frank Heckenbach wrote:
Waldek Hebisch wrote:
Adriaan van Os wrote:
Now we get:
TEST systemtest.pas: ./test_run: line 345: 10339 Segmentation fault ./"$A_OUT" "$1"
(solved now for systemtest.pas but not yet for the other reported segmentation faults)
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 ...
OK. rebuilt the rts with -O0
../.././xgpc -B../.././ -c -g -I. -W -Wall -Wmissing-prototypes -Wmissing-declarations -O0 --unit-path=/Users/adriaan/gnu/gpc/gpc-20050217/gcc-3.4.3/gcc/p/rts --automake `cat needed-options` -DRTS_RELEASE_STRING="'`cat /Users/adriaan/gnu/gpc/gpc-20050217/gcc-3.4.3/gcc/p/rts/rts-version`'" -DGCC_VERSION="'3.4.3'" "/Users/adriaan/gnu/gpc/gpc-20050217/gcc-3.4.3/gcc/p/rts/rtsc.pas"
(etcetera)
Now, instead of:
typical backtrace for the segmentation faults:
Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0x000d703c
Thread 0 Crashed: 0 a.out 0x00008260 _p_FileHandle + 0x4 (files.pas:1015) 1 a.out 0x00003760 _p_WriteErrorMessage + 0x10c (error.pas:750) 2 a.out 0x00003a40 _p__rts_Error_S24_Writestackdump + 0x2cc (error.pas:772) 3 a.out 0x00004438 _p_EndRuntimeError + 0x38 (error.pas:862) 4 a.out 0x00004544 _p__rts_Error_S32_Strerror + 0 (error.pas:875) 5 a.out 0x00002998 _p_IORangeCheckError + 0 (error.pas:585) 6 a.out 0x000026ac _p__M0_main_program + 0x23c (pack2.pas:18) 7 a.out 0x00002808 main + 0x34 (<implicit code>:22) 8 a.out 0x000020a8 _start + 0x188 (crt.c:267) 9 dyld 0x8fe1a558 _dyld_start + 0x64
I get:
Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0x0008203c
Thread 0 Crashed: 0 a.out 0x00009f64 _p_FileHandle + 0x18 (<implicit code>:1079) 1 a.out 0x00003148 _p_WriteErrorMessage + 0x128 (error.pas:750) 2 a.out 0x000033c0 _p__rts_Error_S24_Writestackdump + 0x268 (error.pas:772) 3 a.out 0x00003cc0 _p_EndRuntimeError + 0x38 (error.pas:862) 4 a.out 0x00003dcc _p__rts_Error_S32_Strerror + 0 (error.pas:875) 5 a.out 0x00002350 _p_IORangeCheckError + 0 (error.pas:585) 6 a.out 0x00002068 _p__M0_main_program + 0x23c (pack2.pas:18) 7 a.out 0x000021c4 main + 0x34 (<implicit code>:22) 8 a.out 0x00001a64 _start + 0x188 (crt.c:267) 9 dyld 0x8fe1a558 _dyld_start + 0x64
The line numbers haven't changed. Can't this be the reported inaccurate-line-numbers-in-debug-info problem http://www.gnu-pascal.de/crystal/gpc/en/mail10675.html ? ...
Regards,
Adriaan van Os