From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Carlos O'Donell <carlos@systemhalted.org>
Cc: Jeff Law <law@redhat.com>, Mike Frysinger <vapier@gentoo.org>,
libc-alpha <libc-alpha@sourceware.org>,
<libc-ports@sourceware.org>,
Marcus Shawcroft <marcus.shawcroft@linaro.org>
Subject: Re: [PATCH] Memory fencing problem in pthread cancellation
Date: Mon, 14 Jan 2013 22:21:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1301142218260.19709@digraph.polyomino.org.uk> (raw)
In-Reply-To: <50F48281.3070207@systemhalted.org>
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
next prev parent reply other threads:[~2013-01-14 22:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <50F46969.1000305@redhat.com>
2013-01-14 22:11 ` Carlos O'Donell
2013-01-14 22:21 ` Joseph S. Myers [this message]
2013-01-14 22:58 ` Carlos O'Donell
2013-01-14 23:50 ` Joseph S. Myers
2013-01-31 22:08 ` Jeff Law
2013-01-31 22:05 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1301142218260.19709@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=carlos@systemhalted.org \
--cc=law@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=libc-ports@sourceware.org \
--cc=marcus.shawcroft@linaro.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).