[Patch] Break the Demangle -> Support dependency
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 6 16:34:31 PDT 2016
On Tue, Sep 6, 2016 at 1:29 PM, David Majnemer <david.majnemer at gmail.com>
wrote:
> On Tue, Sep 6, 2016 at 1:23 PM, Rafael EspĂndola via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> On 6 September 2016 at 16:18, Reid Kleckner <rnk at google.com> wrote:
>> > Do we intend to make this demangler asynch signal safe, i.e. not call
>> malloc
>> > at all? If so, I vote keep the custom allocator. If not, I'd say nuke
>> it.
>>
>> Is that a requirement for the demangler in libcxxabi?
>
>
> No. In fact, it cannot be with the API it implements because you can ask
> it to allocate memory via malloc.
>
That is superficial, though. We could add another entry point that takes
avoids malloc.
The use case is, from my crash handler, I want to print a demangled stack
trace and exit, without involving a subprocess. You can't allocate much
stack and you can't use heap memory, so you probably want to use
preallocated global memory or mmap some fresh pages without talking to
glibc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160906/e47643a7/attachment.html>
More information about the llvm-commits
mailing list