http://llvm.org/bugs/show_bug.cgi?id=5291
Summary: JITEmitter holds iterator across set insert()
Product: libraries
Version: trunk
Platform: All
OS/Version: All
Status: ASSIGNED
Severity: normal
Priority: P2
Component: Target-Independent JIT
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
JITEmitter::GetSizeOfGlobalsInBytes() iterates over GVSet and holds the
iterator across calls to GVSet.insert() (in addSizeOfGlobalsInConstantVal).
r54442 introduced this code with GVSet as a std::set. It was incorrect then
because a new GlobalVariable* could wind up behind the current iterator,
causing it to return a too-small size.
r58835 compounded the problem by changing GVSet to a SmallPtrSet, whose
iterators are invalidated on an insert().
Please add a test that fails before the fix too.
--
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