diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-05 08:19:35 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-05 08:19:35 +0000 |
| commit | f9279caef2696406439a7f069d1771f08ca06410 (patch) | |
| tree | 5f75c6678f5c13f59ec3dcbfb21ab4d306902ef7 /eval.c | |
| parent | 0e1ac327ad3a9cfa049daa525b3e4ec8d3a17cdc (diff) | |
| download | ruby-f9279caef2696406439a7f069d1771f08ca06410.tar.gz ruby-f9279caef2696406439a7f069d1771f08ca06410.tar.xz ruby-f9279caef2696406439a7f069d1771f08ca06410.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@16294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) { |
