[LLVMbugs] [Bug 19534] UBSan: False positive for large left shift

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 23 14:19:13 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19534

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
UBSan is correct. C11 6.5.7/3 says:

"If the value of the right operand is negative or is greater than or equal to
the width of the promoted left operand, the behavior is undefined."

C++11 5.8/1 says:

"The behavior is undefined if the right operand is negative, or greater than or
equal to the length in bits of the promoted left operand."

-- 
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/20140423/d3553c1d/attachment.html>


More information about the llvm-bugs mailing list