[LLVMdev] Verifying unwind info/debugging a crash in _Unwind_Backtrace() on OSX

Yury Gribov y.gribov at samsung.com
Wed Aug 27 07:48:08 PDT 2014


 > Is there a way to check whether the unwind info is correct? Could this
 > be a bug in the system implementation of _Unwind_Backtrace, which
 > probably should not crash in the middle of a valid stack trace?

I'm not experienced with OSX but AFAIK unwinders generally trust unwind 
bytecode so if the latter is broken and causes SP miscalculation, 
unwinder will happily read invalid memory and segfault.

You may want to examine unwind tables for Asan runtime (via readelf -u) 
and compare those to e.g. assembler code of __asan_report_error.

-Y



More information about the llvm-dev mailing list