summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-03 15:27:24 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-03 15:27:24 +0000
commite6ae0db36e70999bd41e6cbad106d499477991e9 (patch)
treed67ee3a828bdfb1cd4a39f9bfd5d0886dae7c9bd /vm_core.h
parent44658707d24ccad75b66e2509396e30865111331 (diff)
merge revision(s) 40791,40806: [Backport #8424]
* eval_intern.h (TH_PUSH_TAG): ensure jmpbuf to be accessible before pushing tag to get rid of unaccessible tag by stack overflow. * vm_core.h (rb_vm_tag): move jmpbuf between tag and prev so ensure to be accessible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/vm_core.h b/vm_core.h
index 2ac57fc112..0bffdd3daa 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -461,10 +461,14 @@ enum rb_thread_status {
typedef RUBY_JMP_BUF rb_jmpbuf_t;
+/*
+ the members which are written in TH_PUSH_TAG() should be placed at
+ the beginning and the end, so that entire region is accessible.
+*/
struct rb_vm_tag {
- rb_jmpbuf_t buf;
VALUE tag;
VALUE retval;
+ rb_jmpbuf_t buf;
struct rb_vm_tag *prev;
};