[MacRuby-devel] [MacRuby] #819: Getting references to Method instances leads to segfault
MacRuby
ruby-noreply at macosforge.org
Fri Jul 30 17:37:43 PDT 2010
#819: Getting references to Method instances leads to segfault
-------------------------------------+--------------------------------------
Reporter: eloy.de.enige@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
-------------------------------------+--------------------------------------
Comment(by martinlagardette@…):
Replying to [comment:1 lsansonetti@…]:
> Just curious, does it still crash if you disable the GC? (set env
GC_DISABLE=1).
Just tried, apparently yep, it still does.
From the GDB session:
{{{
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000018
0x0000000100030f98 in method_eq (method=8620089088, sel=0x10106ddf0,
other=8621476064) at proc.c:721
721 if (m1->oclass != m2->oclass
(gdb) l
716 }
717
718 Data_Get_Struct(method, rb_vm_method_t, m1);
719 Data_Get_Struct(other, rb_vm_method_t, m2);
720
721 if (m1->oclass != m2->oclass
722 || m1->rclass != m2->rclass
723 || m1->recv != m2->recv
724 || m1->node->objc_imp != m2->node->objc_imp) {
725 return Qfalse;
(gdb) p m1
$1 = (rb_vm_method_t *) 0x201cc1f80
(gdb) p m2
$2 = (rb_vm_method_t *) 0x201bc7160
(gdb) p m1->node
$3 = (rb_vm_method_node_t *) 0x0
(gdb) p m2->node
$4 = (rb_vm_method_node_t *) 0x0
}}}
`m1` and `m2`'s `oclass`, `rclass` and `recv` are identical, so it is
clearly crashing on `m1->node(0x0)->` :-)
However, I did not have time to investigate if a nullness check is
necessary, of if `node` should not be `NULL`
--
Ticket URL: <http://www.macruby.org/trac/ticket/819#comment:2>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list