ruby-changes:51168
From: shyouhei <ko1@a...>
Date: Wed, 9 May 2018 18:53:25 +0900 (JST)
Subject: [ruby-changes:51168] shyouhei:r63375 (trunk): align jmp_buf to VALUE
shyouhei 2018-05-09 18:53:19 +0900 (Wed, 09 May 2018) New Revision: 63375 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63375 Log: align jmp_buf to VALUE This ec->machine.regs is marked by GC. However jmp_buf is not defined by us. There are chances of unaligned access. We should force it VALUE-aligned. Modified files: trunk/vm_core.h Index: vm_core.h =================================================================== --- vm_core.h (revision 63374) +++ vm_core.h (revision 63375) @@ -823,7 +823,7 @@ typedef struct rb_execution_context_stru https://github.com/ruby/ruby/blob/trunk/vm_core.h#L823 VALUE *register_stack_end; size_t register_stack_maxsize; #endif - jmp_buf regs; + RUBY_ALIGNAS(SIZEOF_VALUE) jmp_buf regs; } machine; } rb_execution_context_t; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/