#1294: MacRuby crashes when loading files on the non-main thread ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: reduction 0.11-blocker ------------------------------------+--------------------------------------- Comment(by kouji@…): I created a better patch for this. Now, I am compiling and checking this. {{{ #!diff diff --git a/vm.cpp b/vm.cpp index 5896ca6..f4d663f 100644 --- a/vm.cpp +++ b/vm.cpp @@ -795,6 +795,7 @@ extern "C" void * rb_vm_get_constant_cache(const char *name) { + RoxorCoreLock lock; return GET_CORE()->constant_cache_get(rb_intern(name)); } @@ -1543,6 +1544,7 @@ vm_alias_method(Class klass, Method method, ID name, bool noargs) SEL sel = rb_vm_id_to_sel(name, noargs ? 0 : 1); rb_vm_method_node_t *node = GET_CORE()->method_node_get(method); if (node != NULL) { + RoxorCoreLock lock; GET_CORE()->add_method(klass, sel, imp, node->ruby_imp, node->arity, node->flags, types); } @@ -2180,6 +2182,7 @@ prepare_method: imp = (IMP)data; } assert(objc_imp_types != NULL); + RoxorCoreLock lock; GET_CORE()->resolve_method(klass, sel, NULL, arity, flags, imp, m, objc_imp_types); } }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1294#comment:15> MacRuby <http://macruby.org/>