[PATCH] D13729: [TSAN, PowerPC] Setjmp/longjmp handling for PowerPC

Bill Schmidt via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 05:20:21 PST 2015


wschmidt added a comment.

OK, thank you.  I am wondering if this is a glibc "feature" when initializing a thread for Power.  For LE, I noticed that it was not setting up the TOC for a call to setjmp from init_thread, which is technically within its rights only if setjmp cannot be overridden.  Hence I added code to materialize the TOC from the .TOC. symbol.  For BE, the TOC must be initialized by placing it in the OPD.  If the OPD TOC slot contains garbage, which would be true if init_thread didn't set it up, then we have no way to materialize the TOC on BE systems.  If this turns out to be the case, we would either need to disable TSAN for BE (not ideal), or try to figure out when setjmp is being called in this heinous way.

I should emphasize that I'm speculating, so looking at things with GDB is the way to go.  But this may give you something to look for.


Repository:
  rL LLVM

http://reviews.llvm.org/D13729





More information about the llvm-commits mailing list