Thorsten Glaser wrote:
Adriaan van Os dixit:
Well, you can see what gdb tells you.
My gdb skills are limited...
Program received signal SIGSEGV, Segmentation fault. 0x08248b92 in _p_Write_String () from /usr/lib/libgpc.so.2.1 Current language: auto; currently c (gdb) bt #0 0x08248b92 in _p_Write_String () from /usr/lib/libgpc.so.2.1 #1 0x1c0009ea in main program () at ./mir047h.pas:41 #2 0x1c000ab3 in main (argc=1, argv=0xcfbf12d0, envp=0xcfbf12d8) at <implicit code>:43
This is weird, because the testsuite indicated a bus error, rather than a segmentation fault (as if the bus error was caused by an exception handler that is now intercepted by gdb). It could be a stack problem.
Anyway, I merged the IBM pro police stack detector http://www.research.ibm.com/trl/projects/security/ssp/ patches for gcc-3.4.4 <http://www.research.ibm.com/trl/projects/security/ssp/gcc3_4_4/ protector-3.4.4-1.tar.gz> with gcc-3.4.4 and gpc-20051116 and then configured with --enable-protector to activate the stack protector by default.
[G5:gcc/p/test] adriaan% gpc -v Reading specs from /Developer/Pascal/gpc344d7/lib/gcc/powerpc-apple-darwin7/3.4.4/specs Configured with: ../gcc-3.4.4/configure --enable-languages=pascal,c --enable-threads=posix --target=powerpc-apple-darwin7 --host=powerpc-apple-darwin7 --build=powerpc-apple-darwin7 --enable-protector --prefix=/Developer/Pascal/gpc344d7 Thread model: posix gpc version 20051116, based on gcc-3.4.4
There were no unexpected testsuite failures. So, if you need the stack detector, I suggest to use the gcc-3.4.4 release rather than the gcc-3.4.5 20051115 snapshot. But I don't know if the stack detector automatically also works for Pascal (maybe Waldek can say).
Regards,
Adriaan van Os