At least on Darwin, the fast unwinder called from TsanCheckFailed completely fails to unwind anything, because we don't give it a valid bp, stack_top and stack_bottom. Let's fix that.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/tsan/rtl/tsan_rtl_report.cc | ||
---|---|---|
700 | This makes me nervous. |
This makes me nervous.
CHECK is the lowest tier functionality that should depend on as less things as possible. cur_thread may not be initialized yet, or already destroyed. On both mac and android it contains a bunch of CHECKs (i.e. you get silent crash on stack overflow), on mac mmap in cur_thread can fail (maybe we are CHECK-failed due to OOM), on android cur_thread can return fake dead_thread_state without stack info.
It's better to call GetThreadStackTopAndBottom here.