[LLVMbugs] [Bug 1633] New: Verifier doesn't fully verify GC intrinsic

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Sep 1 11:40:01 PDT 2007


           Summary: Verifier doesn't fully verify GC intrinsic
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: ASSIGNED
          Severity: minor
          Priority: P2
         Component: Core LLVM classes
        AssignedTo: gordonhenriksen at mac.com
        ReportedBy: gordonhenriksen at mac.com
                CC: llvmbugs at cs.uiuc.edu

The llvm.gc* intrinsics have restrictions beyond what the verifier checks.

llvm.gcroot: 'The first argument specifies the address of a stack object that
contains the root pointer. The second pointer (which must be either a constant
or a global value address) contains the meta-data to be associated with the

  - Not checked: Type of first argument is a pointer to a pointer.
  - Not checked: First argument is an alloca (or a bitcast of an alloca).
  - Not checked: Second argument is a global or a constant.

llvm.gcread: 'The second argument is the address to read from, which should be
an address allocated from the garbage collector. The first object is a pointer
to the start of the referenced object, if needed by the language runtime
(otherwise null).'

  - Not checked: Type of second argument is a pointer to a pointer.

llvm.gcwrite: 'The first argument is the reference to store, the second is the
start of the object to store it to, and the third is the address of the field
of Obj to store to. If the runtime does not require a pointer to the object,
Obj may be null.'

  - Not checked: Type of third argument is a pointer to a pointer.

It should be easy to fix this by adding a follow-up switch to
Verifier::visitIntrinsicFunctionCall at lib/VMCore/Verifier.cpp:1077.

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