libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] Problems with compiling libunwind on Ubuntu 10.04


From: Ken Werner
Subject: Re: [Libunwind-devel] Problems with compiling libunwind on Ubuntu 10.04
Date: Fri, 12 Aug 2011 14:24:02 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11

On 08/11/2011 05:28 AM, Ted Ts'o wrote:
On Wed, Aug 10, 2011 at 07:54:39PM -0700, Arun Sharma wrote:

These are known failures (functionality not implemented on x86_64
yet). But it shouldn't impact the common use cases (local unwinding).
The larger issue libunwind faces is due to APIs that call malloc or
ones which take locks:

* dl_iterate_phdr
* pthread_setspecific

The latter is easy to work around. The former requires a lock free,
malloc free implementation of dl_iterate_phdr.

The main use case I'm trying to implement is a signal handler that
dumps a stack trace to stderr, for use in environments where capturing
an core dump is not convenient/possible, so I don't think that should
be an issue.

Hm, I'm not sure. When calling unw_step from a signal handler you may encounter a dead lock because libunwind calls dl_iterate_phdr which isn't async signal safe. So, in case your code gets a signal during printf or something similar there is a window where the dl_iterate_phdr cannot acquire the lock and you're stuck.

Regards
Ken



reply via email to

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