Bug 14014 - win64 crash with bad dwarf2 symbols (7.4 crash / 7.3 gives error expected)
Summary: win64 crash with bad dwarf2 symbols (7.4 crash / 7.3 gives error expected)
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 7.4
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-24 13:34 UTC by Martin
Modified: 2012-04-24 20:18 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
source and exe (250.58 KB, application/x-zip-compressed)
2012-04-24 13:34 UTC, Martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 2012-04-24 13:34:10 UTC
Created attachment 6361 [details]
source and exe

Windows 64 bit XP Sp2 (though probably affects any 64 bit win) Intel

Free pascal version 2.4.4 does generate broken dwarf2 info. It is expected that gdb reports errors in an attempt to use them.

GDB 7.3 reports such errors as expected
GDB 7.4 crashes

Attached is a simple pascal program, and the exe compiled with fpc 2.4.4 (must be 2.4.4 / other fpc do not generate the required broken dwarf)

The source was compiled using:
   fpc.exe  -gw  hello.pas

GDB was downloaded from http://www.drangon.org/mingw/   mingw-w64-bin-x86_64-20120225.7z : native mingw-w64 toolchain under Windows XP/2003 x64, build (gcc 4.6 branch) from SVN 2012-02-25 (29M)
  http://www.drangon.org/mingw/mirror.php?num=2&fname=mingw-w64-bin-x86_64-20120225.7z

Run gdb as follows:
  gdb.exe -i mi hello.exe
Then enter
   -break-insert main
this crashes gdb 7.4


While this is primarily an issue of fpc and while such a broken file can not be debugged, it still should not lead to a crash. Especially since previous gdb versions were able to detect the error
Comment 1 Tom Tromey 2012-04-24 20:18:54 UTC
With CVS gdb I get:

(gdb) b main
invalid dwarf2 offset 118916

... which is really quite unfriendly, but at least it doesn't crash.

I'm not going to close the bug, since I think we ought to fix
the error message to convey enough information to diagnose the
problem.