aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--eval.c3
2 files changed, 9 insertions, 0 deletions
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 <akr@fsij.org>
+
+ * 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 <matz@ruby-lang.org>
* 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();