[llvm-bugs] [Bug 30570] New: Memory model spec allows for tearing between same-size accesses

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 29 15:46:27 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30570

            Bug ID: 30570
           Summary: Memory model spec allows for tearing between same-size
                    accesses
           Product: new-bugs
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ajeffrey at mozilla.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

At the moment, the LLVM memory model specification allows for tearing. This is
correct for mixed-size or unaligned access, for example if mutexes are used for
large accesses, and atomic instructions are used for small accesses.
Unfortunately, the spec as it currently stands allows for tearing even when the
accesses are all of the same size.

The problem is that in
http://llvm.org/docs/LangRef.html#memory-model-for-concurrent-operations, there
is no guarantee that each of the W_byte operations observed by one R come from
the same W, even when all accesses are to the same address range.

Adding a new sentence to the specification would fix this, something like "If
an atomic read R can only see atomic writes to the same address range, then
there must be a single write W such that each R_byte in R chooses a W_byte from
W."

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160929/f338ace7/attachment.html>


More information about the llvm-bugs mailing list