From: Andrew Haley <aph@redhat.com>
To: Hans Boehm <Hans.Boehm@hp.com>
Cc: Java Patch List <java-patches@gcc.gnu.org>
Subject: Re: Remove data race in libgcj interpreter
Date: Mon, 08 Sep 2008 17:42:00 -0000 [thread overview]
Message-ID: <48C24C82.9030602@redhat.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0809052200260.21567@eeepc-hansboehm>
Hans Boehm wrote:
>
>
> On Fri, 5 Sep 2008, Andrew Haley wrote:
>
>> You're right, I was assuming exactly that. OK, but that is presumably
>> simply a lack of volatility in the declaration of PC.
> As a practical matter, that would probably help at the expense
> of slowing things down a bit on some architectures. Officially this
> doesn't help much, since I believe Posix allows undefined behavior
> for data races, even if they involve volatiles. Even in terms of
> current implementations, I don't believe it prevents hardware reordering
> on architectures like PowerPC.
>
> The C++ working paper provides atomic operations to address these
> issues. I think they're even somewhat implemented in the gcc trunk. But
> I'm not sure you can avoid operations that generate fences on some
> architectures in what should be the fast path.
Indeed. The solution of detecting the case where two threads are concurrently
executing a method seems far the best: it's obviously correct without requiring
deep analysis of memory behaviour. I'm investigating that.
Andrew.
next prev parent reply other threads:[~2008-09-06 9:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 13:31 Andrew Haley
2008-08-21 21:54 ` Andrew Haley
2008-08-22 12:12 ` gij: more thread-safety fixes Andrew Haley
2008-08-22 12:51 ` Remove data race in libgcj interpreter Bryce McKinlay
2008-08-24 1:46 ` Andrew Haley
2008-09-04 16:00 ` Andrew Haley
2008-09-04 16:12 ` David Daney
2008-09-04 16:25 ` Andrew Haley
2008-09-04 18:37 ` David Daney
2008-09-05 9:39 ` Boehm, Hans
2008-09-05 11:28 ` Andrew Haley
2008-09-06 9:26 ` Hans Boehm
2008-09-08 17:42 ` Andrew Haley [this message]
2008-09-22 14:25 ` Andrew Haley
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=48C24C82.9030602@redhat.com \
--to=aph@redhat.com \
--cc=Hans.Boehm@hp.com \
--cc=java-patches@gcc.gnu.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).