[LLVMbugs] [Bug 2911] New: Assert triggered when complex GC roots initialized

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Oct 17 15:01:59 PDT 2008


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

           Summary: Assert triggered when complex GC roots initialized
           Product: libraries
           Version: 2.3
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: maxburke at gmail.com
                CC: llvmbugs at cs.uiuc.edu


In some GC systems where fat pointers are used to keep track of references
within objects, instances of fat pointers may be rooted on the stack to make
them visible to the garbage collector. When the root initializer code in the
collector base class hits these it will assert because it is not a pointer and
a cast<> operation cannot be performed safely. This happens for example with
this code:

%FatPointerType = type { i8*, i32 }
declare void @llvm.gcroot(i8**, i8*) nounwind 

define i32 @TestFunc() gc "somegc"
{
    %local_fatpointer = alloca %FatPointerType
    %local_fatpointer_ptr = bitcast %FatPointerType* %local_fatpointer to i8**
    call void @llvm.gcroot(i8** %local_fatpointer_ptr, i8* null)

    ret i32 0
}


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