[fpc-pascal] problem freeing strings
Marc Santhoff
M.Santhoff at t-online.de
Sat Sep 16 13:49:20 CEST 2006
Hi,
when running a program that is working it SIGSEGVs at the finalization:
<--- snip --->
(gdb) r
Starting program: /usr/home/marc/tmp/test/./h5_attribute
ping
The value of the attribute "Integer attribute" is 1
The value of the attribute with index 2 is ABCD
Name : "Float attribute"
Rank : 2
Dimension sizes :
2 3
Type : FLOAT
Values : -1.100000024E+00 -1.100000024E+00 -1.100000024E+00 -1.100000024E+00 -1.100000024E+00 -1.100000024E+00
Name : "Integer attribute"
Name : "Character attribute"
Iteration done.
Program received signal SIGSEGV, Segmentation fault.
0x804dcea in fpc_ansistr_decr_ref ()
(gdb) bt
#0 0x804dcea in fpc_ansistr_decr_ref ()
#1 0x80552d7 in fpc_finalize ()
#2 0x80497c2 in P$H5_ATTRIBUTE_finalize_implicit () at h5_attribute.pas:338
#3 0x8055a53 in SYSTEM_FINALIZEUNITS ()
#4 0x8055ab6 in SYSTEM_INTERNALEXIT ()
#5 0x8055c7c in SYSTEM_DO_EXIT ()
#6 0x804979a in main () at h5_attribute.pas:338
</--- snip --->
Line 338 is far after the "END." and anything else is done as expected.
How can I track down the source of this poblem? Any hints or rtfm's on
debugging techniques for this special case are welcome ...
TIA,
Marc
More information about the fpc-pascal
mailing list