longjmp and JIT compiled code on Windows


In my project I am still getting crashes on Windows - these seem to
occur intermittently when there is a longjmp that crosses the boundary
from C code over JITed code. I posted regarding this issue previously:


I was wondering if the support for stack unwinding on Win64 is now
improved in LLVM - and if there are any particular guidelines I need
to follow.

Thanks and Regards

There’s two parts to make this work, and we only have one.

The first part is being able to emit the Win64 call-frame information (CFI) at all. Normally this is described by .pdata and .xdata sections in your object file. Today, this all works for ahead-of-time compilations, but not JIT compilations.

The second part is, in a JIT context, registering that unwind information with the operating system (Windows). This would mean calling RtlInstallFunctionTableCallback, but MCJIT doesn’t have any references to that symbol today.

So we are stuck in the same place. I filed a PR for this, feel free to add yourself to it: