[fpc-pascal] Segmentation fault gone if compiled with -glh

leledumbo leledumbo_cool at yahoo.co.id
Mon Jan 10 02:36:04 CET 2011


Compile the attached project (really difficult to trim it down) using two
different options. First, using -glh, then using -g. The first one raises
nothing (program runs fine), while the second raises segmentation fault.
When debugged deeper using gdb, the second gives this backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x004091da in SYSTEM_REMOVE_FREED_FIXED_CHUNKS$POSCHUNK ()
(gdb) bt
#0 0x004091da in SYSTEM_REMOVE_FREED_FIXED_CHUNKS$POSCHUNK ()
0000001 0x00000010 in ?? ()
0000002 0x000651c4 in ?? ()
0000003 0x00408898 in SYSTEM_FINALIZEUNITS ()
0000004 0x00065a38 in ?? ()
0000005 0x0040c0e1 in SYSTEM_EXE_ENTRY$TENTRYINFORMATION ()

Jonas told me to discuss it here due to unclearness whether this is a bug in
my program or in fgl or wherever else.

The source code: 
http://free-pascal-general.1045716.n5.nabble.com/file/n3334353/src.zip
src.zip 
-- 
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Segmentation-fault-gone-if-compiled-with-glh-tp3334353p3334353.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list