From 719841ca3779e22bb8ad3d2f4d3fc93d0db62030 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 13 Dec 2007 11:10:46 +0000 Subject: * eval.c (rb_protect): restore root_jmpbuf to avoid SEGV by 'IO.pipe; [].each.next' with gcc version 3.3.5 (Debian 1:3.3.5-13) on IA64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ eval.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9c882eaf9b..6772164b4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Dec 13 20:09:09 2007 Tanaka Akira + + * eval.c (rb_protect): restore root_jmpbuf to avoid SEGV by + 'IO.pipe; [].each.next' with gcc version 3.3.5 (Debian 1:3.3.5-13) + on IA64. + Thu Dec 13 17:51:54 2007 Yukihiro Matsumoto * string.c (rb_str_split_m): need not to check encoding if regexp diff --git a/eval.c b/eval.c index 4d0601c45d..e1b9996c39 100644 --- a/eval.c +++ b/eval.c @@ -1182,7 +1182,10 @@ rb_protect(VALUE (*proc) (VALUE), VALUE data, int *state) PUSH_TAG(); th->trap_tag = &trap_tag; if ((status = EXEC_TAG()) == 0) { + rb_jmpbuf_t org_jmpbuf; + MEMCPY(&org_jmpbuf, &(th)->root_jmpbuf, rb_jmpbuf_t, 1); SAVE_ROOT_JMPBUF(th, result = (*proc) (data)); + MEMCPY(&(th)->root_jmpbuf, &org_jmpbuf, rb_jmpbuf_t, 1); } th->trap_tag = trap_tag.prev; POP_TAG(); -- cgit v1.2.3