This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [google gcc-4_7, integration] Build more of libstdc++ with frame pointers


>   Thread 1                    Thread 2
>   dlopen                      malloc
>    ... takes loader lock       ... takes malloc lock
>    malloc                      _Unwind_Backtrace
>    ... needs malloc lock         dl_iterate_phdr
>        held by T2                ... needs loader lock held by T1

Am I missing something, or wouldn't it be feasible when instrumenting
malloc to call _Unwind_Backtrace before obtaining the malloc lock (or
drop the malloc lock while calling _Unwind_Backtrace)? Similarly,
couldn't dlopen drop the loader lock while calling malloc?

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]