#1746: A way to get Rakudo to segfault
-------------------+--------------------------------------------------------
 Reporter:  masak  |        Type:  bug   
   Status:  new    |    Priority:  major 
Milestone:         |   Component:  core  
  Version:  2.6.0  |    Severity:  medium
 Keywords:         |        Lang:  perl6 
    Patch:         |    Platform:  all   
-------------------+--------------------------------------------------------

Comment(by nwellnhof):

 After a very long debugging session, I think I tracked this bug down. It's
 in the Rakudo code. Have a look at line 150 in rebless_subclass in
 src/ops/perl6.ops:

 {{{
         new_ins->vtable = interp->vtables[p6o_id];
 }}}

 The class of new_ins is changed. The problem is that the PMC data of
 new_ins has been allocated from the memory pool of the old class. When it
 gets freed, it's freed from the pool of the new class resulting in a
 corrupted free list.

 So it seems that rebless_subclass has to reallocate the PMC data.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1746#comment:9>
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