[MacRuby] #1288: MacRuby displays "reference count underflow" message with rubyspec.
MacRuby
ruby-noreply at macosforge.org
Fri May 20 20:47:45 PDT 2011
#1288: MacRuby displays "reference count underflow" message with rubyspec.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Comment(by watson1978@…):
In my environment, always displays message even if remove a
"/Library/Frameworks/MacRuby.framework" and rebuild all.
The message was not displayed by the following changes, but I do not know
whether those changing are correctly.
{{{
#!diff
diff --git a/vm.cpp b/vm.cpp
index ffcb22d..ebec99b 100644
--- a/vm.cpp
+++ b/vm.cpp
@@ -5619,8 +5619,10 @@ rb_vm_dln_load(void (*init_fct)(void), IMP
__mrep__)
}
~Finally() {
vm->pop_outer();
- vm->replace_outer_stack(old_outer_stack);
- GC_RELEASE(old_outer_stack);
+ if (old_outer_stack != NULL) {
+ vm->replace_outer_stack(old_outer_stack);
+ GC_RELEASE(old_outer_stack);
+ }
vm->set_current_class(old_class);
}
} finalizer(vm);
@@ -5665,8 +5667,10 @@ rb_vm_load(const char *fname_str, int wrap)
}
~Finally() {
vm->pop_outer();
- vm->replace_outer_stack(old_outer_stack);
- GC_RELEASE(old_outer_stack);
+ if (old_outer_stack != NULL) {
+ vm->replace_outer_stack(old_outer_stack);
+ GC_RELEASE(old_outer_stack);
+ }
vm->set_current_class(old_class);
}
} finalizer(vm);
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/1288#comment:2>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list