[llvm-dev] HowToUseLLJIT crashes in debug build

Frank Tetzel via llvm-dev llvm-dev at lists.llvm.org
Tue Nov 19 05:11:43 PST 2019


> Using llvm 9, visual studio, HowToUseLLJIT.cpp
> 
> It works fine in a release build. In a debug build It aborts due to
> an assert failure on Core.cpp (383) because the lhs flags are
> (Exported | Callable) and the rhs flags are (Callable).
> 
> What mods should be made to fix this issue?
> 
> Side note: The comments at the top reference HowToUseJIT.cpp rather
> than HotToUseLLJIT.cpp

Linux here. HowtoUseLLJIT works for me on LLVM 9 built with GCC 9.2, in
release and debug mode.

But HowToUseJIT fails in both modes as EngineBuilder::create() returns
a nullptr which is not checked for in the example code.

And LLJITWithObjectCache crashes as well because the symbol lookup
seems to fail, leading to the function pointer being NULL.

git master has the same issues. Maybe I'm compiling LLVM in the wrong
way. build config is pretty much default:
cmake -DCMAKE_BUILD_TYPE=Release/Debug -DLLVM_BUILD_LLVM_DYLIB=ON ..

There's an old bug report:
https://bugs.llvm.org/show_bug.cgi?id=38261

The proposed fix for HowToUseJIT does not seem to work anymore.

Best regards,
Frank


More information about the llvm-dev mailing list