unw_backtrace is not async-signal-safe
authorTudor Bosman <tudorb@fb.com>
Tue, 17 Dec 2013 00:57:31 +0000 (16:57 -0800)
committerJordan DeLong <jdelong@fb.com>
Fri, 20 Dec 2013 21:07:40 +0000 (13:07 -0800)
commit1ceb5edc1e7383f928252f88c2ab45e3662e9978
treee27870fc5b70bc7351445d18f8d7f1eba6a88269
parentc3637eb86ac4fa24fbee20b39373011b50a05404
unw_backtrace is not async-signal-safe

Summary:
Even though it should be according to the docs; tdep_trace allocates memory on
first use from each thread.

Wrote a slow loop that we can use from the signal handler. The exception tracer
still uses the fast version.

Test Plan: fbconfig -r folly/experimental/symbolizer folly/experimental/exception_tracer && fbmake runtests_opt

Reviewed By: philipp@fb.com

FB internal diff: D1101095
folly/experimental/symbolizer/SignalHandler.cpp
folly/experimental/symbolizer/StackTrace.cpp
folly/experimental/symbolizer/StackTrace.h
folly/experimental/symbolizer/Symbolizer.h
folly/experimental/symbolizer/test/StackTraceTest.cpp [new file with mode: 0644]