Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler)-Use regular setjmp function for MinGW #2585

Merged
merged 3 commits into from
Sep 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/vm/src/trap/handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
// it's fine most of the time, but not for JIT'd code that may not respect stack ordring
// Using a special setjmp here, with NULL as second parameter to disable that behaviour
// and have a regular simple setjmp/longjmp sequence
#ifdef __MINGW32__
// MINGW64 doesn't expose the __intrinsic_setjmp function, but a similar _setjump instead
#define platform_setjmp(buf) _setjmp(buf, NULL)
#else
#define platform_setjmp(buf) __intrinsic_setjmp(buf, NULL)
#endif
#define platform_longjmp(buf, arg) longjmp(buf, arg)
#define platform_jmp_buf jmp_buf
#elif defined(CFG_TARGET_OS_MACOS)
Expand Down