[llvm-bugs] [Bug 33146] New: __GCC_ATOMIC_SHORT_LOCK_FREE defined incorrectly for WebAssembly

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 23 13:23:02 PDT 2017


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

            Bug ID: 33146
           Summary: __GCC_ATOMIC_SHORT_LOCK_FREE defined incorrectly for
                    WebAssembly
           Product: clang
           Version: unspecified
          Hardware: Other
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dan433584 at gmail.com
                CC: dschuff at google.com, jgravelle at google.com,
                    llvm-bugs at lists.llvm.org

8-bit and 16-bit atomics in the proposed WebAssembly memory model are not
guaranteed to be lock-free, even though 32-bit atomics are.

clang currently defines __GCC_ATOMIC_SHORT_LOCK_FREE and others to be 2, which
is incorrect; with current WebAssembly shared memory proposal, they should be
1.

A patch to implement this in clang is here: https://reviews.llvm.org/D31516

The WebAssembly memory model proposal is here:
https://github.com/WebAssembly/threads

-- 
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/20170523/75914e47/attachment.html>


More information about the llvm-bugs mailing list