[llvm-bugs] [Bug 36610] New: clang can miscompile code involving uninitialized value and xor-s

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 6 01:39:25 PST 2018


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

            Bug ID: 36610
           Summary: clang can miscompile code involving uninitialized
                    value and xor-s
           Product: clang
           Version: 5.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: avg at FreeBSD.org
                CC: llvm-bugs at lists.llvm.org

Created attachment 20001
  --> https://bugs.llvm.org/attachment.cgi?id=20001&action=edit
demonstration code

It appears can miscompile (or incorrectly optimize) code where an uninitialized
variable gets assigned a value through a series of assignments that set only a
subset of bits in the variable.  In the end all bits in the variable get
defined values, but intermediate assignments involve operations with undefined
bits.

-- 
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/20180306/9561e370/attachment.html>


More information about the llvm-bugs mailing list