[LLVMbugs] [Bug 15024] New: LLVM verifier accepts invalid bitcasts

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 21 12:37:24 PST 2013


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

             Bug #: 15024
           Summary: LLVM verifier accepts invalid bitcasts
           Product: new-bugs
           Version: 3.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: whitequark at whitequark.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9904
  --> http://llvm.org/bugs/attachment.cgi?id=9904
Sample bitcode file

I've been able to generate a file with the following instruction:

  %1 = select i1 %0, i1 icmp eq (i64 and (i64 ptrtoint (%i.Object* bitcast (i64
1 to %i.Object*) to i64), i64 1), i64 0), i1 icmp eq (i64 and (i64 ptrtoint
(%i.Object* bitcast (i64 2 to %i.Object*) to i64), i64 1), i64 0)

In particular, it includes an invalid bitcast from i64 to a pointer. This file
manages to be emitted as machine code and even executes correctly, but is
rejected by the LLVM assembly parser.

-- 
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