[llvm-bugs] [Bug 28754] New: UBSan reports false positives on unaligned memory accesses on MS ABI

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 28 09:57:38 PDT 2016


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

            Bug ID: 28754
           Summary: UBSan reports false positives on unaligned memory
                    accesses on MS ABI
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: resistor at mac.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Microsoft explicitly documents unaligned memory accesses on scalar types to be
allowed under their ABI, though natural alignment is still recommended for
performance reasons.  UBSan still reports errors on unaligned scalar accesses,
leading to false positives on code that is compliant with the MS ABI.

Note that Microsoft's document does still require natural alignment for members
of unions and aggregates.

MS alignment documentation for scalar types:
https://msdn.microsoft.com/en-us/library/94z15h2c.aspx

MS alignment documentation for unions and aggregates:
https://msdn.microsoft.com/en-us/library/9dbwhz68.aspx

-- 
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/20160728/aa23a5ad/attachment.html>


More information about the llvm-bugs mailing list