This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Malloc-less demangler interface
Paolo Carlini <pcarlini@suse.de> writes:
> Hi Ian (Simon, all)
>
> >Simon Baldwin <simonb@google.com> writes:
> >
> >>kay... all done as discussed. Thanks for the feedback/discussion.
> >>
> >>Patch updated, retested, and attached. Please revisit.
> >>
> >Approved and committed as revision 121305.
> >
> I have just noticed this thread and I'd like to have your comments
> about the impact of the work on libstdc++/14493: in short, submitter
> complained that the what() function in the standard exception classes
> returns an un-demangled string. Then, I thought we could easily fix
> the problem by way of __cxa_demangle but quickly gave up exactly
> because of the allocation on the heap...
I don't think it helps. what() apparently is supposed to return a
const char*. The new interface to the demangling code still doesn't
give you any way to free the required memory buffer.
The new interface lets you avoid allocating any memory when you call
the demangler. But it doesn't have any magic to help if you need to
return the result somewhere.
Ian