#1067: t/pmc/objects.t:  premature death on Darwin/PPC
---------------------+------------------------------------------------------
 Reporter:  jkeenan  |       Owner:        
     Type:  bug      |      Status:  new   
 Priority:  normal   |   Milestone:        
Component:  GC       |     Version:  1.6.0 
 Severity:  medium   |    Keywords:  pmc GC
     Lang:           |       Patch:        
 Platform:           |  
---------------------+------------------------------------------------------

Comment(by jkeenan):

 Here is the part of ''t/pmc/objects.t'' where the failure is observed:
 {{{
     937 .namespace []       # Reset to root namespace for next test
     938
     939 .sub PMC_as_classes__derived_3
     940     .local pmc MyInt10
     941     .local pmc MyInt10_2
     942     get_class $P0, "Integer"
     943
     944     subclass MyInt10, $P0, "MyInt10"
     945     addattribute MyInt10, 'intval'
     946     get_class $P1, "MyInt10"
     947     subclass MyInt10_2, $P1, "MyInt10_2"
     948
     949     .local pmc i
     950     i = new "MyInt10_2"
     951     $I0 = isa i, "Integer"
     952     ok( $I0, 'obj isa grandparent (Integer)' )
     953     $I0 = isa i, "MyInt10"
     954     ok( $I0, 'obj isa parent (MyInt10)' )
     955     $I0 = isa i, "MyInt10_2"
     956     ok( $I0, 'obj isa its class (MyInt102)' )
     957
     958     i = 42    # set_integer is overridden below
     959     $I0 = i   # get_integer is overridden below
     960     is( $I0, 42, 'set/get_integer overridden' )
     961
     962     $S0 = i   # get_string is overridden below
     963     is( $S0, 'MyInt10_2(42)', 'set/get_string overridden' )
     964 .end
 }}}
 Here is the relevant part of ''src/gc/api.c'':
 {{{
 PARROT_EXPORT
 void
 Parrot_gc_mark_PMC_alive_fun(PARROT_INTERP, ARGMOD_NULLOK(PMC *obj))
 {
     ASSERT_ARGS(Parrot_gc_mark_PMC_alive_fun)
     if (!PMC_IS_NULL(obj)) {
         PARROT_ASSERT(PObj_is_PMC_TEST(obj));  ## <-- line 253

         if (PObj_is_live_or_free_TESTALL(obj))
             return;

         /* mark it live */
         PObj_live_SET(obj);

         /* if object is a PMC and contains buffers or PMCs, then attach
 the PMC
          * to the chained mark list. */
         if (PObj_is_special_PMC_TEST(obj))
             mark_special(interp, obj);
         else if (PMC_metadata(obj))
             Parrot_gc_mark_PMC_alive(interp, PMC_metadata(obj));
     }
 }
 }}}

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1067#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to