This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[RFC][BZ #956] AS safe backtrace()
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: libc-alpha at sourceware dot org
- Date: Mon, 8 Apr 2013 08:45:11 +0200
- Subject: [RFC][BZ #956] AS safe backtrace()
Hi,
I need for profiler to avoid calling dlopen() in backtrace().
First problem is AS safety.
Second problem is that if I hook function called by dlopen() and
supply its implementation by dlopen() then I get infinite loop.
Proper solution would be convince libgcc to supply unwind_stack as a
macro or link libgcc staticaly.
Otherwise I need to add checking if malloc and dlopen locks are held.
For rtld corresponding line is following.
__rtld_lock_lock_recursive (GL(dl_load_lock));
How is dl_load_lock visible?