Open
Description
UBSAN from LLVM >= 17.x reads 8 bytes in front of a function to look for markers. This fails when a JIT compiler like ORC-Jit places code immediately at the beginning of an mmap
ed section (so reading 8 byte upfront ends up in unmapped memory and crashes).
See also https://reviews.llvm.org/D148665 and the similar discussion in #65253
Not sure if ORC should/wants to do something generic to avoid users running into this. For the time being I added this workaround to one of our porjects to unblock our codebase: https://github.com/pytorch/pytorch/pull/133623/files