diff options
-rw-r--r-- | Changes | 5 | ||||
-rw-r--r-- | byterun/caml/fail.h | 7 |
2 files changed, 12 insertions, 0 deletions
@@ -564,6 +564,11 @@ Release branch for 4.06: under ocamldebug calls Pervasives.flush_all (Xavier Leroy, report by Paul Steckler, review by Gabriel Scherer) +- MPR#7638: in the Windows Mingw64 port, multithreaded programs compiled + to bytecode could crash when raising an exception from C code. + This looks like a Mingw64 issue, which we work around with GCC builtins. + (Xavier Leroy) + - GPR#1155: Fix a race condition with WAIT_NOHANG on Windows (Jérémie Dimino and David Allsopp) diff --git a/byterun/caml/fail.h b/byterun/caml/fail.h index 3ae82b1e96..54907e4259 100644 --- a/byterun/caml/fail.h +++ b/byterun/caml/fail.h @@ -44,6 +44,13 @@ struct longjmp_buffer { sigjmp_buf buf; }; +#elif defined(__MINGW64__) && defined(__GNUC__) && __GNUC__ >= 4 +/* MPR#7638: issues with setjmp/longjmp in Mingw64, use GCC builtins instead */ +struct longjmp_buffer { + intptr_t buf[5]; +}; +#define sigsetjmp(buf,save) __builtin_setjmp(buf) +#define siglongjmp(buf,val) __builtin_longjmp(buf,val) #else struct longjmp_buffer { jmp_buf buf; |