cruelchen / google-breakpad

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

dump_syms fails with segmentation fault when trying to create symbol file for Android .so file #657

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build an Android (armeabi) shared library with the Android NDK (r10d)
2. Build latest breakpad on 64bit linux with any compiler (tried gcc-4.6, 
gcc-4.8, gcc-4.9 and clang-3.4) 
3. Try to execute dump_syms to get symbol file for the built Android shared 
library.

What is the expected output? What do you see instead?
Expect normal output of dump_syms with some warnings.
What I get:
 - Loads of warnings "failed to demangle _ZNSt3__xxxxxxxxxxxxxxxxxx with error -2"
 - Eventually segmentation fault

What version of the product are you using? On what operating system?
Latest (fresh) checkout of google-breakpad.
Linux HP-EliteBook-8560w 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:36:28 
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Please provide any additional information below.
A run with gdb delivers the following info:
[trimmed - all lines above are similar to line #33741]

#33741 0x00007ffff7b37266 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#33742 0x00007ffff7b374fa in __cxa_demangle () from 
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
#33743 0x0000000000405fe3 in 
google_breakpad::DwarfCUToModule::GenericDIEHandler::ProcessAttributeString 
(this=0x1001e50, attr=<optimized out>, form=<optimized out>, 
    data="_ZNSt3__<obfuscated>"...)
    at src/common/dwarf_cu_to_module.cc:356
#33744 0x0000000000415477 in dwarf2reader::CompilationUnit::ProcessAttribute 
(this=0x7fffffffdd88, dieoffset=2159795, start=0x7ffff4488bfb "\276\360\031", 
attr=dwarf2reader::DW_AT_MIPS_linkage_name, form=<optimized out>)
    at src/common/dwarf/dwarf2reader.cc:444
#33745 0x0000000000414e16 in ProcessDIE (this=0x7fffffffdd88, 
dieoffset=2159795, start=<optimized out>, abbrev=...) at 
src/common/dwarf/dwarf2reader.cc:459
#33746 dwarf2reader::CompilationUnit::ProcessDIEs (this=0x7fffffffdd88) at 
src/common/dwarf/dwarf2reader.cc:507

#33747 0x0000000000414a5a in dwarf2reader::CompilationUnit::Start 
(this=0x7fffffffdd88) at src/common/dwarf/dwarf2reader.cc:300
#33748 0x0000000000421e60 in LoadDwarf<google_breakpad::ElfClass32> 
(dwarf_filename=..., elf_header=<optimized out>, big_endian=<optimized out>, 
handle_inter_cu_refs=<optimized out>, module=<optimized out>)
    at src/common/linux/dump_symbols.cc:281
#33749 (anonymous namespace)::LoadSymbols<google_breakpad::ElfClass32> 
(obj_file="libhuesdk.so", big_endian=false, elf_header=0x7ffff3ce4000, 
read_gnu_debug_link=false, info=0x7fffffffe1a8, options=..., module=<optimized 
out>)
    at src/common/linux/dump_symbols.cc:645
#33750 0x000000000041cc02 in 
ReadSymbolDataElfClass<google_breakpad::ElfClass32> (options=..., 
out_module=0x7fffffffe2f8, elf_header=<optimized out>, obj_filename=..., 
debug_dirs=...) at src/common/linux/dump_symbols.cc:891
#33751 google_breakpad::ReadSymbolDataInternal (obj_file=0x7ffff3ce4000 
"\177ELF\001\001\001", obj_filename="libhuesdk.so", debug_dirs=std::vector of 
length 0, capacity 0, options=..., module=0x7fffffffe2f8)
    at src/common/linux/dump_symbols.cc:937
#33752 0x000000000041e09e in google_breakpad::ReadSymbolData 
(obj_file="libhuesdk.so", debug_dirs=std::vector of length 0, capacity 0, 
options=..., module=0x7fffffffe2f8) at src/common/linux/dump_symbols.cc:972
#33753 0x000000000041dff8 in google_breakpad::WriteSymbolFile (obj_file=<error 
reading variable: Cannot access memory at address 0x683c666f3c666f47>, 
debug_dirs=<error reading variable: Cannot access memory at address 
0x7fffff7fefb8>, 
    options=..., sym_stream=...) at src/common/linux/dump_symbols.cc:955
#33754 0x0000000000426879 in main (argc=<optimized out>, argv=<optimized out>) 
at src/tools/linux/dump_syms/dump_syms.cc:82

Original issue reported on code.google.com by water...@gmail.com on 17 Jun 2015 at 1:04

GoogleCodeExporter commented 9 years ago
Did you solved the problem ?

Original comment by Amine.Ai...@gmail.com on 15 Jul 2015 at 9:51