[fpc-pascal] fp libraries do not like cmem ?

Tomas Hajny XHajT03 at hajny.biz
Fri Feb 14 01:37:57 CET 2014


On Thu, February 13, 2014 22:25, Fred van Stappen wrote:


Hi,

 .
 .
> Here the result of debug + bt of a LCL program using cmem (no problem
> without cmem) : it does not help me, i do not understand the numbers :
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fffe8596700 (LWP 2580)]
> 0x00007fffefe02c14 in ?? ()
>    from /home/fred/uoslib/examples/lib/Linux/64bit/libuos-64.so
>
>>> (gdb) bt
>
> #0  0x00007fffefe02c14 in ?? ()
>    from /home/fred/uoslib/examples/lib/Linux/64bit/libuos-64.so
> #1  0x0000000000000040 in ?? ()
> #2  0x00007fffefe02d0e in ?? ()
>    from /home/fred/uoslib/examples/lib/Linux/64bit/libuos-64.so
> #3  0x00007fffede0e088 in ?? ()
> #4  0x00007fffefdffdb0 in ?? ()
>    from /home/fred/uoslib/examples/lib/Linux/64bit/libuos-64.so
> #5  0x0000000000de8f38 in ?? ()
> #6  0x00007ffff7e01240 in ?? ()
> #7  0x0000000000de8f30 in ?? ()
> #8  0x00007fffefe02e03 in ?? ()
>    from /home/fred/uoslib/examples/lib/Linux/64bit/libuos-64.so
> #9  0x00007fffef5b8190 in ?? ()
> #10 0x00007fffefdffdb0 in ?? ()
>    from /home/fred/uoslib/examples/lib/Linux/64bit/libuos-64.so
>
> @ Tomas, in earlier topic, you give result of gdb with much more details,
> how did you do it ?
> (i used bt, like you explained, but see the result, it is with much less
> details than yours...

You should compile both the library and your test program with -gw. Make
sure to rebuild it fully (i.e. delete all *.ppu and *.o files before
recompiling).

As mentioned by others somewhere else, it's better to turn optimizations
off using -O- too in order to make sure that the debug information is
accurate (this part may not be strictly necessary, but I'd do it anyway at
least if the bt result isn't helpful enough).

Tomas





More information about the fpc-pascal mailing list