libunwind-devel
[Top][All Lists]
Advanced

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

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


From: Shruti Shetty
Subject: Re: [Libunwind-devel] [PATCH] Re: dl_iterate_phdr deadlock in unw_step
Date: Wed, 24 Feb 2016 16:32:25 +0530

You could replace all library mutex calls with trylocks instead ( pthread_mutex_trylock) to avoid deadlocks from libunwind..

~Shruti

On Tue, Feb 23, 2016 at 11:11 PM, Jonathan Byrd <address@hidden> wrote:
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.

_______________________________________________
Libunwind-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/libunwind-devel



reply via email to

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