[RFC][BZ #956] AS safe backtrace()

Ondřej Bílka neleai@seznam.cz
Mon Apr 8 13:30:00 GMT 2013


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?




More information about the Libc-alpha mailing list