summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cont.c b/cont.c
index 3a7f7ee235..914eed4ccc 100644
--- a/cont.c
+++ b/cont.c
@@ -237,6 +237,15 @@ cont_restore_1(rb_context_t *cont)
th->first_proc = sth->first_proc;
/* restore machine stack */
+#ifdef _M_AMD64
+ {
+ /* workaround for x64 SEH */
+ jmp_buf buf;
+ setjmp(buf);
+ ((_JUMP_BUFFER*)(&cont->jmpbuf))->Frame =
+ ((_JUMP_BUFFER*)(&buf))->Frame;
+ }
+#endif
if (cont->machine_stack_src) {
MEMCPY(cont->machine_stack_src, cont->machine_stack,
VALUE, cont->machine_stack_size);