On Wed, 2013-06-19 at 16:57 +0200, Torvald Riegel wrote: > (Re-sending to the proper list. Sorry for the noise at gcc@.) > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57643 > > The HTM fastpath didn't handle a situation in which a relaxed > transaction executed unsafe code that in turn starts a transaction; it > simply tried to wait for the "other" transaction, not checking whether > the current thread started the other transaction. [snip] > Peter and/or Andreas: Could you please check that this fixes the bug you > see on Power/s390? Thanks.
This patch fixed the hang, but now I'm dying due to an abort in the test case. Specifically, the first abort in unsafe() int __attribute__((transaction_unsafe)) unsafe(int i) { if (_ITM_inTransaction() != inIrrevocableTransaction) dying here: abort(); __transaction_atomic { x++; } if (_ITM_inTransaction() != inIrrevocableTransaction) abort(); return i+1; } This is due to the following in _ITM_inTransaction(): 47 if (tx && (tx->nesting > 0)) (gdb) p tx $2 = (GTM::gtm_thread *) 0x10901bf0 (gdb) p tx->nesting $3 = 1 (gdb) step 49 if (tx->state & gtm_thread::STATE_IRREVOCABLE) (gdb) p tx->state $4 = 3 (gdb) p gtm_thread::STATE_IRREVOCABLE $5 = 2 (gdb) step 50 return inIrrevocableTransaction; Peter