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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to