[llvm-dev] VModuleKey K not valid here

Dibyendu Majumdar via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 13 13:49:49 PDT 2019


Hi,

I am getting following assertion failure when attempting to remove a module.

/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:311: llvm::Error
llvm::orc::LegacyCompileOnDemandLayer<BaseLayerT, CompileCallbackMgrT,
IndirectStubsMgrT>::removeModule(llvm::orc::VModuleKey) [with
BaseLayerT = llvm::orc::LegacyIRTransformLayer<llvm::orc::LegacyIRCompileLayer<llvm::orc::LegacyRTDyldObjectLinkingLayer,
llvm::orc::SimpleCompiler>,
std::function<std::unique_ptr<llvm::Module>(std::unique_ptr<llvm::Module>)>
>; CompileCallbackMgrT = llvm::orc::JITCompileCallbackManager;
IndirectStubsMgrT = llvm::orc::IndirectStubsManager;
llvm::orc::VModuleKey = long unsigned int]: Assertion `I !=
LogicalDylibs.end() && "VModuleKey K not valid here"' failed.

1) Can 0 ever be a valid VModuleKey? How can one reliably detect an
invalid VModuleKey?
2) Secondly it seems to me that  following the assertion there should
be a check so that the code dosn't continue? It is causing
segmentation fault in release builds.

Regards
Dibyendu


More information about the llvm-dev mailing list