public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/51752] New: trans-mem: publication safety violated
@ 2012-01-04 14:18 torvald at gcc dot gnu.org
  2012-01-04 19:18 ` [Bug middle-end/51752] " torvald at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: torvald at gcc dot gnu.org @ 2012-01-04 14:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51752

             Bug #: 51752
           Summary: trans-mem: publication safety violated
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: torvald@gcc.gnu.org


Created attachment 26238
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26238
publication safety test

Publication safety refers to transactions being able to safely publish data by
setting something like a shared flag (e.g., "data=23; __transaction_atomic {
flag = 1; }").  For that to work, programmers must access the data only if the
flag is true.  Second, the compiler must preserve program order in this case
and is not allowed to reorder the two loads (i.e., load data before loading the
flag).  Otherwise, there will be a race condition and the data load can return
an inconsistent value.

The attached test shows that this isn't working currently (e.g., look at
149t.optimized, the load of data is moved to out of the loop and before the
"flag" loads).


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-16 18:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-04 14:18 [Bug middle-end/51752] New: trans-mem: publication safety violated torvald at gcc dot gnu.org
2012-01-04 19:18 ` [Bug middle-end/51752] " torvald at gcc dot gnu.org
2012-01-05 14:30 ` aldyh at gcc dot gnu.org
2012-01-06 14:03 ` torvald at gcc dot gnu.org
2012-02-09 16:24 ` aldyh at gcc dot gnu.org
2012-02-09 16:44 ` rguenth at gcc dot gnu.org
2012-02-09 17:40 ` rth at gcc dot gnu.org
2012-02-09 18:41 ` torvald at gcc dot gnu.org
2012-02-28 20:10 ` aldyh at gcc dot gnu.org
2012-03-16 19:15 ` aldyh at gcc dot gnu.org

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).