From 3fdd8b5bb986f63aa3bbbe617ae7e03e41054d78 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Fri, 5 Oct 2012 15:01:23 +0200 Subject: [PATCH] Make sure that we setup a barrier before installing the jitted code Also make sure we remove the setup call frame at the proper moment. --- vm/llvm/state.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vm/llvm/state.cpp b/vm/llvm/state.cpp index 40c903bab2..f3c9d7bfb0 100644 --- a/vm/llvm/state.cpp +++ b/vm/llvm/state.cpp @@ -328,6 +328,7 @@ namespace rubinius { jit::RuntimeDataHolder* rd = jit.context().runtime_data_holder(); + atomic::memory_barrier(); ls_->start_method_update(); if(!req->is_block()) { @@ -687,12 +688,12 @@ namespace rubinius { state->set_call_frame(call_frame); state->gc_independent(gct); - state->set_call_frame(0); wait_cond.wait(wait_mutex); wait_mutex.unlock(); state->gc_dependent(); + state->set_call_frame(0); // if(config().jit_inline_debug) { // if(block) { // log() << "JIT: compiled block inside: "