[llvm-bugs] [Bug 27255] New: NULL-based pointer arithmetic generates ud2

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 6 15:35:58 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27255

            Bug ID: 27255
           Summary: NULL-based pointer arithmetic generates ud2
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: stsp at list.ru
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16178
  --> https://llvm.org/bugs/attachment.cgi?id=16178&action=edit
a test case

Attached is the test-case.

$ gcc -m32 -Wall -O2 -o null null.c
$ ./null
1

$ clang -m32 -Wall -O2 -o null null.c
$ ./null
Illegal instruction (core dumped)

-- 
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/20160406/94611ea4/attachment.html>


More information about the llvm-bugs mailing list