diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-28 04:58:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-28 04:58:25 +0000 |
commit | 3ff85b795ac42976e5ed51c6add0b18660455abd (patch) | |
tree | 89fb30ecffde7408e7a2e1a76cb1c8a182a77fc6 /vm_insnhelper.c | |
parent | 76bb597728c0d9a2228367e0ecaf6b92b7ffdfd7 (diff) | |
download | ruby-3ff85b795ac42976e5ed51c6add0b18660455abd.tar.gz |
eval.c: no method calls at stack overflow
* eval.c (setup_exception): get rid of method calls before raising
stack overflow, not to cause stack overflow again.
* defs/id.def: add IDs for backtraces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index e9dc27139a..8cd9295d66 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -24,12 +24,18 @@ static rb_control_frame_t *vm_get_ruby_level_caller_cfp(rb_thread_t *th, rb_control_frame_t *cfp); -static void -vm_stackoverflow(void) +VALUE +ruby_vm_sysstack_error_copy(void) { VALUE e = rb_obj_alloc(rb_eSysStackError); rb_obj_copy_ivar(e, sysstack_error); - rb_exc_raise(e); + return e; +} + +static void +vm_stackoverflow(void) +{ + rb_exc_raise(ruby_vm_sysstack_error_copy()); } static inline rb_control_frame_t * |