aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-16 07:59:10 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-16 07:59:10 +0000
commitd490bdbae003c93a4acf080bb3f3a1f7ed6127ff (patch)
treee1ba0ef81ec14a50e760f7974d2759a792181079 /vm_insnhelper.c
parentfde77a7b6714425606ac9f4ac3e32f1c9ad54da7 (diff)
downloadruby-d490bdbae003c93a4acf080bb3f3a1f7ed6127ff.tar.gz
Revert "Add direct marking on iseq operands"
This reverts commit r62706. It causes SEGV on i686-linux (debian) and armv7l-linux-eabihf: http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180309T204300Z.diff.html.gz http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180309T211706Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 0f365db3f5..0bab81e906 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -3282,10 +3282,11 @@ vm_ic_update(IC ic, VALUE val, const VALUE *reg_ep)
}
static VALUE
-vm_once_dispatch(rb_execution_context_t *ec, ISEQ iseq, ISE is)
+vm_once_dispatch(rb_execution_context_t *ec, ISEQ iseq, IC ic)
{
rb_thread_t *th = rb_ec_thread_ptr(ec);
rb_thread_t *const RUNNING_THREAD_ONCE_DONE = (rb_thread_t *)(0x1);
+ union iseq_inline_storage_entry *const is = (union iseq_inline_storage_entry *)ic;
again:
if (is->once.running_thread == RUNNING_THREAD_ONCE_DONE) {
@@ -3294,10 +3295,10 @@ vm_once_dispatch(rb_execution_context_t *ec, ISEQ iseq, ISE is)
else if (is->once.running_thread == NULL) {
VALUE val;
is->once.running_thread = th;
- val = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
- RB_OBJ_WRITE(ec->cfp->iseq, &is->once.value, val);
+ val = is->once.value = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
/* is->once.running_thread is cleared by vm_once_clear() */
is->once.running_thread = RUNNING_THREAD_ONCE_DONE; /* success */
+ rb_iseq_add_mark_object(ec->cfp->iseq, val);
return val;
}
else if (is->once.running_thread == th) {