HomePhabricator

Always inlining PrintCurrentStackSlow of tsan library to fix tail-call issue

Description

Always inlining PrintCurrentStackSlow of tsan library to fix tail-call issue

The real problem is that sanitizer_print_stack_trace obtains current PC and
expects the PC to be in the stack trace after function calls. We don't
prevent tail calls in sanitizer runtimes, so this assumption does not
necessary hold.

We add "always inline" attribute on PrintCurrentStackSlow to address this
issue, however this solution is not reliable enough, but unfortunately, we
don't see any simple, reliable solution.

Reviewers: samsonov hfinkel kbarton tjablin dvyukov kcc

http://reviews.llvm.org/D19148

Thanks Hal, dvyukov, and kcc for invaluable discussion, I have even borrowed
part of dvyukov's summary as my commit message!

Details

Committed
cychengApr 20 2016, 3:28 AM
Parents
rL266868: [sanitizer] Fix 'dyld: Symbol not found: _dyldVersionNumber' link error on…
Branches
Unknown
Tags
Unknown