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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to