From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2215 invoked by alias); 14 Jan 2013 22:21:30 -0000 Received: (qmail 2190 invoked by uid 22791); 14 Jan 2013 22:21:29 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_DM X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Jan 2013 22:21:22 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TusPA-0003Eg-Ra from joseph_myers@mentor.com ; Mon, 14 Jan 2013 14:21:20 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 14 Jan 2013 14:21:20 -0800 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Mon, 14 Jan 2013 22:21:18 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1TusP7-0006AY-4J; Mon, 14 Jan 2013 22:21:17 +0000 Date: Mon, 14 Jan 2013 22:21:00 -0000 From: "Joseph S. Myers" To: Carlos O'Donell CC: Jeff Law , Mike Frysinger , libc-alpha , , Marcus Shawcroft Subject: Re: [PATCH] Memory fencing problem in pthread cancellation In-Reply-To: <50F48281.3070207@systemhalted.org> Message-ID: References: <50F46969.1000305@redhat.com> <50F48281.3070207@systemhalted.org> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00018.txt.bz2 On Mon, 14 Jan 2013, Carlos O'Donell wrote: > diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c > index 58ca9ac..d7ac847 100644 > --- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c > +++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c > @@ -104,6 +104,7 @@ asm ( > " mov r6, r0\n" > " cmp r3, #0\n" > " beq 4f\n" > + atomic_asm_full_barrier() > "5: mov r0, r6\n" > " ldmfd sp!, {r4, r5, r6, lr}\n" > " " CFI_ADJUST_CFA_OFFSET (-16) "\n" > @@ -123,7 +124,7 @@ asm ( > #else > "1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n" > #endif > -"2: .word libgcc_s_resume(GOTOFF)\n" > +"2: .word libgcc_s_handle(GOTOFF)\n" > " .size _Unwind_Resume, .-_Unwind_Resume\n" > ); That last change doesn't seem right. Note the subsequent "bx r3" if r3 isn't zero. If you want to test libgcc_s_handle for being zero, you then need, separately (after the barrier?) to load the libgcc_s_resume value. (Whatever you do in unwind-forcedunwind.c, presumably much the same change should go in unwind-resume.c as well.) -- Joseph S. Myers joseph@codesourcery.com