jump table crash with x64 JIT

Hi,

I’m successfully using LLVM in my compiler project, but it works only if I disable jump tables codegen.

In the following gist you can find the generated LLVM IR and x64 code for the buggy and working 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