ruby-changes:47045
From: nobu <ko1@a...>
Date: Fri, 23 Jun 2017 20:15:31 +0900 (JST)
Subject: [ruby-changes:47045] nobu:r59160 (trunk): vm_core.h: sandwich jmpbuf
nobu 2017-06-23 20:15:26 +0900 (Fri, 23 Jun 2017) New Revision: 59160 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59160 Log: 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. Modified files: trunk/vm_core.h Index: vm_core.h =================================================================== --- vm_core.h (revision 59159) +++ vm_core.h (revision 59160) @@ -691,11 +691,16 @@ typedef RUBY_JMP_BUF rb_jmpbuf_t; https://github.com/ruby/ruby/blob/trunk/vm_core.h#L691 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; }; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/