[LLVMdev] Invalid or unaligned stack exception on Windows

Dibyendu Majumdar mobile at majumdar.org.uk
Mon Apr 27 16:16:38 PDT 2015


On 27 April 2015 at 23:01, Paweł Bylica <chfast at gmail.com> wrote:
> I had similar problem around LLVM 3.5 and I'm almost certain that is only
> Windows 64-bit related. In my case longjmp was crashing from time to time
> and moreover debugger trap was triggered inside longjmp every time (it could
> be ignored). I haven't found a proper solution and switched from library
> longjmp to builtin one (llvm.eh.sjlj.longjmp). Moving longjmp call from C++
> managed by MSVC to LLVM IR can also be helpful.
>
> My guess is that longjmp does not work on Windows 64bit because it needs
> correct stack unwinding information and LLVM does not deliver it. Back then
> in 3.5 days exception handling on Windows was quite poor.
>

Hi,
Thank you - that's very helpful to know. If I compiled using gcc or
clang would this still be the case? Presumably I can still compile
LLVM using MSVC.

Regards
Dibyendu




More information about the llvm-dev mailing list