This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/13206] New: libiberty cp-demangler segfaults


The libiberty c++ demangler is used by gdb. The demangler appears to fail for
some mangled code. Compiled monotone (http://www.venge.net/monotone/) and boost
(http://www.boost.org/) as example to test out demangler with existing gcc 3.2.3
on RHEL 3.

Attempted to load the resulting monotone executable into gdb built from uberbaum
(checked out 2003/11/25 from :pserver:anoncvs@sources.redhat.com:/cvs/uberbaum).
When loading the monotone executable in gdb, get segfault.

 
Program received signal SIGSEGV, Segmentation fault.
0x08232dc7 in d_print_comp (dpi=0xbfffa3a0, dc=0x851cf1c)
    at ../../uber/libiberty/cp-demangle.c:2553
2553          if (dpi->buf[dpi->len - 1] == '>')

Appears that demangler is dieing trying to demangle:

mangled=0xb6c95dce
"_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPSt4pairISsPFbP6sqlitePPcEESt6vectorIS9_SaIS9_EEEESE_ET0_T_SG_SF_"

The stripped monotone is loaded okay by gdb.  Precompiled version of the code
for i386 are at http://people.redhat.com/wcohen/gdb_tuning/

-- 
           Summary: libiberty cp-demangler segfaults
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wcohen at redhat dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13206


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]