diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | eval.c | 3 |
2 files changed, 9 insertions, 0 deletions
@@ -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 @@ -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(); |