Hi,
Recently I hit an issue that LLJIT crashes when CodeGenOpt::Less or higher is given.
After investigation, it turned out that the issue is some global constant string in the IR, like
@.str.117 = private unnamed_addr constant [9 x i8] c"lineitem\00", align 1
becomes an invalid pointer in the generated code.
$1 = 0xf7fab054 <error: Cannot access memory at address 0xf7fab054>
The issue doesn’t show up when CodeGenOpt::None is given. It also doesn’t show up when the host program (which uses the LLVM library) is compiled with “-O0”. So it looks like some kind of use-after-free issue.
Does any one have seen similar issues before, or have some idea on how to fix this?
Thanks!
Best,
Haoran