From 340390093b1db331630d227edbd0f32d2d2b882a Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 18 Nov 2013 13:47:56 +0000 Subject: eval_intern.h: refine stack overflow detection * eval_intern.h (TH_PUSH_TAG, TH_EXEC_TAG): refine stack overflow detection. chain local tag after setjmp() successed on it, because calling setjmp() also can overflow the stack. [ruby-dev:47804] [Bug #9109] * vm_eval.c (rb_catch_obj): now th->tag points previous tag until TH_EXEC_TAG(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_eval.c') diff --git a/vm_eval.c b/vm_eval.c index bace6bbbcf..24bac12bbf 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -1823,7 +1823,7 @@ rb_catch_obj(VALUE t, VALUE (*func)(), VALUE data) TH_PUSH_TAG(th); - th->tag->tag = tag; + _tag.tag = tag; if ((state = TH_EXEC_TAG()) == 0) { /* call with argc=1, argv = [tag], block = Qnil to insure compatibility */ -- cgit v1.2.3