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

           Summary: New type system: Invalid module not caught by verifier
           Product: libraries
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Archive library
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=6927)
 --> (http://llvm.org/bugs/attachment.cgi?id=6927)
An example of an invalid module

I've been converting my frontend over to use the new type system, and I noticed
that llvm-dis was asserting when I attempted to print out the module contents.
It turns out that the module was invalid, but the module verifier should have
caught this when the module was first created, which it did not.

The main problem appears to be that the BitReader complains when you try to
take a GEP of an abstract struct type.

I've included an example module that causes BitReader to fail. Unfortunately,
since I can't print out the module, it's hard to tell exactly what's wrong with
it. I know from looking in the debugger that it's complaining that
tart.reflect.Module is an opaque type. The problem is that in this case it's
*supposed* to be opaque. However, that shouldn't be your concern - I'm mainly
writing this bug because I think it would be good if the module verifier could
catch errors like this.

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