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

Simone Atzeni via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 11:48:06 PST 2015


Bill,

I guess you might be right.
The only info that I can gather from GDB are the following:

------------------------------------------------------------------------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xfffb7196430 (LWP 13646)]
0x7c0802a6f821ffd0 in ?? ()
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.149.el6_6.7.ppc64
(gdb) bt
#0  0x7c0802a6f821ffd0 in ?? ()
#1  0x00000fffb7f6e590 in .start_thread () from /lib64/libpthread.so.0
#2  0x00000fffb7d448ec in .__clone () from /lib64/libc.so.6
------------------------------------------------------------------------------------------------------------------------

Looks like there the problem comes from libthread or glibc. So, could be the init_thread problem you are talking about.
I think some debuginfo are missing, but I don’t have any root access to this machine so I can’t install anything.

Do you have any other idea how to investigate this problem?

Best,
Simone

> On Nov 9, 2015, at 06:20, Bill Schmidt <wschmidt at linux.vnet.ibm.com> wrote:
> 
> 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