On Fri, May 6, 2016 at 2:51 AM, Jakub Jelinek <ja...@redhat.com> wrote: > > Anyway, perhaps I'm misremembering, if there is a mode that really can't > fail due to allocation failures or not, we need to deal with that. > Ian or Jason, can all the demangle users allocate heap memory or not? > And, if __cxa_demangle can fail, there is some allocation_failure stuff > in the file.
The function cplus_demangle_v3_callback must not call malloc. The whole point of that function is to work when nothing else works. That is why d_demangle_callback does not, and must not, call malloc. Ian