Compiler produces debug symbols which can not be read by gdb
Original Reporter info from Mantis: Boris
-
Reporter name: Boris Popov
Original Reporter info from Mantis: Boris
- Reporter name: Boris Popov
Description:
Recent versions of fpc 2.7.1 (no extact date at hands) started to produce possibly invalid debugging symbols which causes gdb 7.4 or 7.5 to either crash, or hang somewhere in the glibc malloc() code. This happens only with particular set of units. In particular, pay special attention to
uses
BGRABitmap;
clause in the weirdunit.pas unit. If one will comment out this statement, then fpc produces correct output and gdb no longer crashes on startup. In the attached archive there is also the backtrace of gdb crash.
Steps to reproduce:
I've tried to reduce code to absolute minimum. The attached project can be compiled with recent version of Lazarus which should have bgrabitmap pack installed. To fix offending revision of bgrabitmappack.lpk it is also included in the archive.
Additional information:
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &LtPos;http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
&LtPos;http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from test...Reading symbols from test.dbg...*** glibc detected *** gdb: malloc(): memory corruption: 0x00000000021c6970 ***
Mantis conversion info:
- Mantis ID: 23365
- OS: Ubuntu
- OS Build: 12.04
- Build: trunk
- Platform: x64
- Version: 2.7.1
- Fixed in revision: 23056 (#2dac1c44)
- Monitored by: » Boris (Boris Popov), » @martin_frb (Martin Friebe)
- Target version: 2.7.1