nightmare666 / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

Linux dump_sym has trouble with -ffunction-sections -Wl,--gc-sections #367

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile the attached test program:
g++-4.2 -m32 test.cc -o test_dwarf -g
g++-4.2 -m32 test.cc -o test_stabs -gstabs
g++-4.2 -m32 test.cc -o test_dwarf_gc -g -ffunction-sections -Wl,--gc-
sections
g++-4.2 -m32 test.cc -o test_stabs_gc -gstabs -ffunction-sections -Wl,--gc-
sections

2. Run dump_syms on the four programs

What is the expected output? What do you see instead?

test_dwarf and test_stabs work
--
test_dwarf_gc aborts with:
dump_syms: ../../../common/linux/dwarf_cu_to_module.cc:717: void 
google_breakpad::DwarfCUToModule::AssignLinesToFunctions(): Assertion 
`!line || current < line->address || within(*line, current)' failed.
--
test_stabs_gc aborts with:
dump_syms: ../../../common/linux/dump_stabs.cc:68: virtual bool 
google_breakpad::DumpStabsHandler::EndCompilationUnit(uint64_t): Assertion 
`comp_unit_base_address_' failed.

What version of the product are you using? On what operating system?

Breakpad r507 on 64-bit Ubuntu Hardy.

Original issue reported on code.google.com by thestig@chromium.org on 4 Feb 2010 at 11:29

Attachments:

GoogleCodeExporter commented 9 years ago
Whoops, the test_dwarf_gc output should have been on line 644, not 717. I 
forgot I had 
local changes.

Original comment by thestig@chromium.org on 5 Feb 2010 at 12:17

GoogleCodeExporter commented 9 years ago

Original comment by ted.mielczarek on 19 Feb 2010 at 3:47

GoogleCodeExporter commented 9 years ago
I can reproduce this.  Thanks for the reproduction instructions!

Original comment by jimbla...@gmail.com on 21 Feb 2010 at 5:51

GoogleCodeExporter commented 9 years ago
I've put a fix up for review:
http://breakpad.appspot.com/64002

Original comment by jimbla...@gmail.com on 24 Feb 2010 at 7:11

GoogleCodeExporter commented 9 years ago
I've put a fix up for review:
http://breakpad.appspot.com/64002

Original comment by jimbla...@gmail.com on 24 Feb 2010 at 7:11

GoogleCodeExporter commented 9 years ago
I've landed that fix.  Please let me know if it doesn't work for you.

Original comment by jimbla...@gmail.com on 24 Feb 2010 at 10:38

GoogleCodeExporter commented 9 years ago
Thanks! r538 make the test_dwarf_gc test case pass, but test_stabs_gc still 
fails. 
Should I open a separate bug for that. (Presumably we don't care as much about 
STABS 
at the moment, so it'll just get fixed later.)

Original comment by thestig@chromium.org on 24 Feb 2010 at 10:55

GoogleCodeExporter commented 9 years ago
No, we might as well leave this bug open.  *sigh*

Original comment by jimbla...@gmail.com on 24 Feb 2010 at 11:20

GoogleCodeExporter commented 9 years ago
I've put a fix for the STABS lossage up for review:
http://breakpad.appspot.com/65001

Original comment by jimbla...@gmail.com on 25 Feb 2010 at 12:02

GoogleCodeExporter commented 9 years ago
STABS makes me sad. I was tempted to instead submit a patch removing STABS 
support...

Original comment by jimbla...@gmail.com on 25 Feb 2010 at 12:06

GoogleCodeExporter commented 9 years ago
As far as I know, this should be fixed in r542.  Please give it a try.

Original comment by jimbla...@gmail.com on 2 Mar 2010 at 8:00