libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH] Re: dl_iterate_phdr deadlock in unw_step


From: Jonathan Byrd
Subject: [Libunwind-devel] [PATCH] Re: dl_iterate_phdr deadlock in unw_step
Date: Tue, 23 Feb 2016 17:41:55 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On Mon, 22 Feb 2016 at 16:10:51 Arun Sharma wrote:
> The only known work around is to
> implement your own dl_iterate_phdr that doesn't call malloc by hooking
> into low level APIs that notify you every time a new shared object is
> loaded.

The attached patch adds the function 'unw_set_iterate_phdr_function' to the libunwind API, allowing a custom implementation of dl_iterate_phdr() to be hooked in. That implementation would need to maintain a local cache (or however else you wanted to manage it) to remove the need for taking the glibc loader lock.

Regards,
Jonathan Byrd
Senior Application Developer
Allinea Software Ltd.

Attachment: 0130_custom_dl_phdr_iterate_callback.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]