This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Does dladdr1 allocate heap memory?
- From: Ponnuvel Palaniyappan <pponnuvel at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-help at sourceware dot org
- Date: Fri, 10 Nov 2017 21:10:36 +0000
- Subject: Re: Does dladdr1 allocate heap memory?
- Authentication-results: sourceware.org; auth=none
- References: <CAOL8xrXF7KD=w0O0i5YWKsbVWtw5dMQ3c1hM9FN4bQc2U06v8g@mail.gmail.com> <a676d765-8e06-9aef-7b4e-b0c6c8658aa7@redhat.com>
Thanks a lot!
On 10-Nov-2017 9:07 pm, "Florian Weimer" <fweimer@redhat.com> wrote:
> On 11/10/2017 07:52 PM, Ponnuvel Palaniyappan wrote:
>
>> Getting the struct link_map
>> is one of the steps and I am wondering
>> if I can make use of dladdr1 for that purpose.
>>
>
> I double-checked the situation, and dladdr1 will not call malloc in case
> of an error, so you should be good.
>
> (The code does not even install the ld.so exception handler, so it would
> not be able to catch errors anyway.)
>
> Florian
>