[LLVMbugs] [Bug 10473] New: New type system: Invalid module not caught by verifier

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jul 24 22:14:04 PDT 2011


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: unassignedbugs at nondot.org
        ReportedBy: viridia at gmail.com
                CC: llvmbugs at cs.uiuc.edu


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.



More information about the llvm-bugs mailing list