https://llvm.org/bugs/show_bug.cgi?id=30799
Bug ID: 30799 Summary: Assertion "mapping to a source type"' failed Product: new-bugs Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: h...@chromium.org CC: llvm-bugs@lists.llvm.org, nicolaswe...@gmx.de, pe...@pcc.me.uk, r...@google.com, r...@google.com Classification: Unclassified When using lld to do an LTO build of Chrome on Windows, I hit this assert: lld-link: ../lib/Linker/IRMover.cpp:283: llvm::Type* {anonymous}::TypeMapTy::get(llvm::Type*, llvm::SmallPtrSet<llvm::StructType*, 8u>&): Assertion `!(Pair.first != Ty && Pair.second == Ty) && "mapping to a source type"' failed. Still not sure what's going on, but dumping my notes so far. The linker has already loaded and linked a bunch of bitcode into a module M1, and now we're trying to add another one, M2. The assert fires during IRLinker::computeTypeMapping() It's trying to map a type in M2 (Src) to one in M1 (Dst). The type the assert is firing when trying to map from this type in M2 to a type in M1. %struct.MojoHandleSignalsState = type { i32, i32 } Now, the mystery is that this type doesn't originally exist in M2. If I create a new Context, read M2 and dump it, there's no mention of %struct.MojoHandleSignalsState. However, if I create a new Context, read M1, then read M2 afterwards and dump M2, suddenly the type is there! Trying to trace where the type comes from, it appears to be used in a ConstantAsMetadata object (but again, only if M1 has been read into the context first). Types from M1 seem to be leaking over to M2 via the Context in some way I don't understand.. Any ideas for how to debug this would be appreciated. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs