[llvm-bugs] [Bug 27315] New: new overflow check elimination code is too good

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 11 01:37:19 PDT 2016


            Bug ID: 27315
           Summary: new overflow check elimination code is too good
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: regehr at cs.utah.edu
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Sorry I didn't notice this during patch review, but the overflow elimination
logic that Sanjoy committed recently is too strong.

This program executes a signed overflow:

int foo(int p1, int p2) { return p1 + p2; }
int main(void) {
  for (int a = 0; a != 46; a = foo(a, 3))

But compiled like this, the overflow check goes away:

clang -O -fsanitize=undefined -fsanitize-trap=undefined

I'm using r265913

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/20160411/cdf12f26/attachment.html>

More information about the llvm-bugs mailing list