[llvm-dev] jump table crash with x64 JIT

Csaba Hruska via llvm-dev llvm-dev at lists.llvm.org
Sat Feb 24 14:59:10 PST 2018


Hi,

I'm successfully using LLVM in my compiler project, but it works only if I
disable *jump tables* codegen.
In the following gist
<https://gist.github.com/csabahruska/0122b73529f4c377173454e1743eeea4> you
can find the generated LLVM IR and x64 code for the buggy
<https://gist.github.com/csabahruska/0122b73529f4c377173454e1743eeea4#file-bug-s>
and working
<https://gist.github.com/csabahruska/0122b73529f4c377173454e1743eeea4#file-ok-s>
version of the same program. The ok.ll and bug.ll differs only in a
*"no-jump-tables"="true"* function attribute.
I've investigated a little and turned out that the code crashes at this
point:
https://gist.github.com/csabahruska/0122b73529f4c377173454e1743eeea4#file-bug-s-L212
BTW the generated code code seems fine for me.
Do you have any idea what is going on?
Is there any extra alignment requirement?

Regards,
Csaba Hruska
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180224/31f141e8/attachment.html>


More information about the llvm-dev mailing list