runtime: prevent deadlock when profiling signal arrives in stack scan

Precise stack scan needs to unwind the stack. When it is
unwinding the stack, if a profiling signal arrives, which also
does a traceback, it may deadlock in dl_iterate_phdr. Prevent
this deadlock by setting up runtime_in_callers before traceback.

Change-Id: If9b15dd00f1d3f6ce557ea740d9fd6fd3b842879
Reviewed-by: Ian Lance Taylor <>
3 files changed