[PATCH] D19001: [ppc64] Disable sibling-call-optimization when building tsan library by clang

Chuang-Yu Cheng via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 03:57:07 PDT 2016


cycheng added a comment.

Agree!

1. First, I would like to update my investigations:
  - Current mechanism of "BufferedStackTrace::LocatePcInTrace and MatchPc" is unable to handle tail-call to "__tsan::PrintCurrentStackSlow" case.
  - I used clang 3.9.0 on x86 to build tsan library, of course it tail-call to  "__tsan::PrintCurrentStackSlow", and I found it passed print-stack-trace.cc test was because of lucky. see: https://llvm.org/bugs/show_bug.cgi?id=27280#c3
  - Possible solutions:
    1. Use "always_inline" attribute on "__tsan::PrintCurrentStackSlow"
    2. New mechanism? I'm still thinking @@
2. No, the threshold does not affect runtime, but it **depend on compiler's codegen decision**, I feel it is a magic number, use large number can cause poping incorrect stack count.


http://reviews.llvm.org/D19001





More information about the llvm-commits mailing list