[llvm-dev] HowToUseLLJIT crashes in debug build

Rob Conde via llvm-dev llvm-dev at lists.llvm.org
Tue Nov 19 06:01:47 PST 2019

Odd. I went to try it on godbolt, but for some reason it can't find "llvm/IR/Attributes.inc". In any case I created https://bugs.llvm.org/show_bug.cgi?id=44060. I can try to configure a linux vm at some point to see if I can repo there - doesn't seem like it should be platform specific :shrug:

From: Frank Tetzel <s1445051 at mail.zih.tu-dresden.de>
Sent: Tuesday, November 19, 2019 8:11 AM
To: llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org>
Cc: Rob Conde <rob.conde at ai-solutions.com>
Subject: Re: [llvm-dev] HowToUseLLJIT crashes in debug build

> 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:

There's an old bug report:

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

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191119/5a0474fb/attachment.html>

More information about the llvm-dev mailing list