http://sourceware.org/bugzilla/show_bug.cgi?id=13925

             Bug #: 13925
           Summary: objdump -g segfaults in stab_demangle_v3_arg for C++
                    files.
           Product: binutils
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassig...@sourceware.org
        ReportedBy: jan.sm...@alcatel-lucent.com
    Classification: Unclassified


This bug got introduced somewhere between 2.20 and 2.21.

I verified that 2.20 works OK with that same file. GCC 4.6.3 was used to create
this file. 

Also works fine for non-c++ object files (hence the demangle). 

I have also tried to revert the last few commits to binutils/stabs.c , without
any success.

Thanks
 - Jan


(gdb) run  -g file.o
Starting program: ./binutils-2.22/binutils/objdump -g file.o

file.o:     file format a.out-i386


Program received signal SIGSEGV, Segmentation fault.
stab_demangle_v3_arg (dhandle=0x73cc20, info=0x73cc90, dc=0x0, context=0x0,
pvarargs=0x7fffffffd8bc) at stabs.c:5213
5213      switch (dc->type)
(gdb) bt
#0  stab_demangle_v3_arg (dhandle=0x73cc20, info=0x73cc90, dc=0x0, context=0x0,
pvarargs=0x7fffffffd8bc) at stabs.c:5213
#1  0x000000000041bd7c in stab_demangle_v3_arglist (dhandle=0x73cc20,
info=0x73cc90, arglist=<value optimized out>, pvarargs=0x7fffffffda68) at
stabs.c:5172
#2  0x000000000041ed3f in stab_demangle_v3_argtypes (dhandle=<value optimized
out>, info=0x73cc90, tagname=0xff72c0 "char_traits<char>", pp=0x7fffffffdb88,
    structp=1, typenums=0x7fffffffdb10) at stabs.c:5130
#3  stab_demangle_argtypes (dhandle=<value optimized out>, info=0x73cc90,
tagname=0xff72c0 "char_traits<char>", pp=0x7fffffffdb88, structp=1,
    typenums=0x7fffffffdb10) at stabs.c:3747
#4  parse_stab_argtypes (dhandle=<value optimized out>, info=0x73cc90,
tagname=0xff72c0 "char_traits<char>", pp=0x7fffffffdb88, structp=1,
    typenums=0x7fffffffdb10) at stabs.c:2958
#5  parse_stab_members (dhandle=<value optimized out>, info=0x73cc90,
tagname=0xff72c0 "char_traits<char>", pp=0x7fffffffdb88, structp=1,
    typenums=0x7fffffffdb10) at stabs.c:2776
#6  parse_stab_struct_type (dhandle=<value optimized out>, info=0x73cc90,
tagname=0xff72c0 "char_traits<char>", pp=0x7fffffffdb88, structp=1,
    typenums=0x7fffffffdb10) at stabs.c:2039
#7  0x000000000041ef99 in parse_stab_type (dhandle=0x73cc20, info=0x73cc90,
type_name=<value optimized out>, pp=0x7fffffffdb88, slotp=<value optimized
out>)
    at stabs.c:1555
#8  0x0000000000420bf0 in parse_stab_string (dhandle=0x73cc20, handle=0x73cc90,
type=<value optimized out>, desc=<value optimized out>, value=0,
    string=0x7ffff70f2064
"char_traits<char>:Tt23993=s1assign::23994=f6:_ZNSt11char_traitsIcE6assignERcRKc;2A?;eq::23995=f4:_ZNSt11char_traitsIcE2eqERKcS2_;2A?;lt::23995:_ZNSt11char_traitsIcE2ltERKcS2_;2A?;compare::23996=f3:_ZN"...)
at stabs.c:1003
#9  parse_stab (dhandle=0x73cc20, handle=0x73cc90, type=<value optimized out>,
desc=<value optimized out>, value=0,
    string=0x7ffff70f2064
"char_traits<char>:Tt23993=s1assign::23994=f6:_ZNSt11char_traitsIcE6assignERcRKc;2A?;eq::23995=f4:_ZNSt11char_traitsIcE2eqERKcS2_;2A?;lt::23995:_ZNSt11char_traitsIcE2ltERKcS2_;2A?;compare::23996=f3:_ZN"...)
at stabs.c:652
#10 0x00000000004173e5 in read_symbol_stabs_debugging_info (abfd=<value
optimized out>, syms=0x7263a0, symcount=11534, no_messages=1) at rddbg.c:310
#11 read_debugging_info (abfd=<value optimized out>, syms=0x7263a0,
symcount=11534, no_messages=1) at rddbg.c:63
#12 0x0000000000406fd1 in dump_bfd (abfd=0x724010) at ./objdump.c:3216
#13 0x00000000004073e0 in display_bfd (abfd=0x724010) at ./objdump.c:3286
#14 0x0000000000407568 in display_file (filename=<value optimized out>,
target=<value optimized out>) at ./objdump.c:3351
#15 0x0000000000407d35 in main (argc=3, argv=0x7fffffffdeb8) at
./objdump.c:3630

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to