From a6ae274c3b06174401276fde2636f17720508532 Mon Sep 17 00:00:00 2001 From: usa Date: Sun, 8 Jul 2007 17:19:01 +0000 Subject: [PATCH] * cont.c (cont_restore_1): workaround for x64-mswin64's SEH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 9 ++++++--- cont.c | 9 +++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 622a71c720..d5bc821b01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,10 @@ -Sun Jul 08 02:08:53 2007 NARUSE, Yui +Mon Jul 9 02:17:36 2007 NAKAMURA Usaku - * lib/json.rb, lib/json/, ext/json/: - import JSON 1.1.1 + * cont.c (cont_restore_1): workaround for x64-mswin64's SEH. + +Sun Jul 8 02:08:53 2007 NARUSE, Yui + + * lib/json.rb, lib/json/, ext/json/: import JSON 1.1.1 Sat Jul 7 21:59:29 2007 Tanaka Akira 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);