[Lazarus] Debugging the rtl/fcl - segfault in sdfdataset
Luca Olivetti
luca at wetron.es
Wed Jul 15 17:31:28 CEST 2020
El 15/7/20 a les 17:20, Luca Olivetti via lazarus ha escrit:
> Hello,
>
> something broke in sdfdataset with fpc 3.2.0 (a segfault that doesn't
> occur if I compile the same program with fpc 3.0.4) and I'm trying to
> debug it.
>
> First I tried to compile just the fcl with debug information
>
> cd fpc-3.2.0/packages
> OPT=-gl make
> sudo make install
>
> but lazarus then complained that it couldn't find the DB unit (?), so I
> recompiled everything:
>
> cd fpc-3.2.0
> make distclean
> OPT=-gl make all
> sudo make install
>
> but even so I'm missing some debug info. This is what I see in the call
> stack windows when I put a breakpoint on TFixedFormatDataSet.GetRecord
> (file fpc-3.2.0/packages/fcl-db/src/sdf/sdfdata.pp)
>
>
> #0 GETRECORD(0x7fffe3949370, 0x0, GMNEXT, false) at
> fcl-db/src/sdf/sdfdata.pp:546
> #1 ?? at :0
> #2 ?? at :0
> #3 ?? at :0
> #4 ?? at :0
> #5 ?? at :0
> #6 ?? at :0
>
> that's with "copy all", the content of the call stack window is
> different, i.e. (only the index, location and line columns for brevity)
>
> 0 sdfdata.pp (fcl-db/src/sdf/) 546
> 1 :7FFFFFFFDF58
> 2 :7FFFFFFFE0A0
> 3 :00000001
> 4 :7FFFE3949370
> 5 :7FFFFFFFE129
> 6 :00000000
>
>
> Any hint?
For the record, the segfault happens here
#0 SYSGETMEM_FIXED(544) at ../inc/heap.inc:963
#1 ?? at :0
#2 fpc_ansistr_decr_ref(<error reading variable: Cannot access memory at
address 0x30>) at ../inc/astrings.inc:148
#3 ?? at :0
i.e. the call stack is even more wacky, but I know it comes from
TFixedFormatDataSet.GetRecord
Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
More information about the lazarus
mailing list