summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-23 11:15:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-23 11:15:26 +0000
commitf61e8084bb167fb43d15c3433cf82165b2d693ab (patch)
tree64514259ed90b05e3af9251bbfa6f924b776113f /vm_core.h
parent4a4627fb0d770269f876c711b642b7f7275b22d2 (diff)
vm_core.h: sandwich jmpbuf
* vm_core.h (rb_vm_tag): move jmpbuf which should be stored at the last in TH_PUSH_TAG, between tag and state so ensure to be accessible. reapplied r40806. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/vm_core.h b/vm_core.h
index 9081bcea3d..028d9c3177 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -691,11 +691,16 @@ typedef RUBY_JMP_BUF rb_jmpbuf_t;
struct rb_vm_tag {
VALUE tag;
VALUE retval;
+ rb_jmpbuf_t buf;
struct rb_vm_tag *prev;
enum ruby_tag_type state;
- rb_jmpbuf_t buf;
};
+STATIC_ASSERT(rb_vm_tag_buf_offset, offsetof(struct rb_vm_tag, buf) > 0);
+STATIC_ASSERT(rb_vm_tag_buf_end,
+ offsetof(struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) <
+ sizeof(struct rb_vm_tag));
+
struct rb_vm_protect_tag {
struct rb_vm_protect_tag *prev;
};