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 demangler/70909] Libiberty Demangler segfaults (4)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70909

--- Comment #51 from Mark Wielaard <mark at gcc dot gnu.org> ---
(In reply to Mark Wielaard from comment #50)
> (In reply to Mark Wielaard from comment #49)
> > (In reply to Pedro Alves from comment #48)
> > > GDB is released separately from binutils though, and GDB 8.0 is going to
> > > branch very soon.  IWBN to have this in the binutils-gdb repo by then.
> > 
> > Trying to integrate this into binutils-gdb produces a large number of
> > unexpected failures in the gdb testsuite.
> 
> This is caused by gdb doing its own memory management to reuse
> demangle_components. Whenever gdb d_grabs a new struct demangle_component we
> now need to initialize d_printing to zero.
> [...]
> But maybe the cplus_demangle_fill_xxx functions should do this initializing
> instead? In that case gdb only needs to handle initializing d_printing for
> its own make_empty function.

yeah, I am convinced that is the more correct approach. Proposed patch:
https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00622.html

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