1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (ruby_cleanup): wrap ruby_finalize_0 by SAVE_ROOT_JMPBUF to

avoid SEGV by at_exit { Fiber.new{}.resume } on IA64.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-05-05 08:19:35 +00:00
parent b998a6dbe8
commit 50c2a48b85
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Mon May 5 17:17:40 2008 Tanaka Akira <akr@fsij.org>
* eval.c (ruby_cleanup): wrap ruby_finalize_0 by SAVE_ROOT_JMPBUF to
avoid SEGV by at_exit { Fiber.new{}.resume } on IA64.
Mon May 5 12:12:11 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* array.c (rb_ary_slice_bang): should adjust length before making

8
eval.c
View file

@ -164,7 +164,13 @@ ruby_cleanup(int ex)
errs[1] = th->errinfo;
th->safe_level = 0;
Init_stack((void *)&state);
ruby_finalize_0();
PUSH_TAG();
if ((state = EXEC_TAG()) == 0) {
SAVE_ROOT_JMPBUF(th, ruby_finalize_0());
}
POP_TAG();
errs[0] = th->errinfo;
PUSH_TAG();
if ((state = EXEC_TAG()) == 0) {