[LLVMbugs] [Bug 23624] New: -fsanitize=signed-integer-overflow breaks under optimization
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu May 21 14:51:38 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23624
Bug ID: 23624
Summary: -fsanitize=signed-integer-overflow breaks under
optimization
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: vonosmas at gmail.com
Reporter: vonosmas at gmail.com
CC: llvmbugs at cs.uiuc.edu, richard-llvm at metafoo.co.uk
Classification: Unclassified
$ cat tmp/ubsan-overflow/a.cc
int one();
int main() {
int x = one(); // 1
int y = x - 0; // 1
return x - y;
}
$ cat tmp/ubsan-overflow/b.cc
int one() { return 1; }
$ ./bin/clang++ -fsanitize=signed-integer-overflow -O1 tmp/ubsan-overflow/*.cc
&& ./a.out
tmp/ubsan-overflow/a.cc:6:12: runtime error: signed integer overflow: 1 - 0
cannot be represented in type 'int'
Seriously?
I will investigate this issue, reporting here to track progress and share the
link.
--
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/20150521/a867efc5/attachment.html>
More information about the llvm-bugs
mailing list