[LLVMbugs] [Bug 12202] New: memset of negative size hangs clang with -O3

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 7 01:46:03 PST 2012


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

             Bug #: 12202
           Summary: memset of negative size hangs clang with -O3
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: timurrrr at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


$ cat test.c
#include <string.h>

int main(void) {
  char buff[1] = {0};
  memset(buff, 0xff, -8);
  return 0;
}

$ time clang -m32 -O3 -g test.c
<hangs>

$ clang -v
clang version 3.1 (trunk 152211)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list