Ticket #757: TRAC-757-2.patch

File TRAC-757-2.patch, 1.0 KB (added by cdarroch, 12 years ago)

possible partial fix, but leads to another crash

  • src/pmc/parrotinterpreter.pmc

    old new  
    9090                PObj_is_class_TEST(s->vtables[i]->pmc_class)) { 
    9191                STRING * const class_name = 
    9292                    VTABLE_get_string(s, s->vtables[i]->pmc_class); 
    93                 PARROT_ASSERT(VTABLE_exists_keyed_str(d, 
    94                     d->class_hash, class_name)); 
    9593 
    96                 VTABLE_delete_keyed_str(d, d->class_hash, class_name); 
    97  
    98                 if (last_remove == i + 1) { 
    99                     --d->n_vtable_max; 
    100                     last_remove = i; 
     94                if (VTABLE_exists_keyed_str(d, 
     95                    d->class_hash, class_name)) { 
     96                    VTABLE_delete_keyed_str(d, d->class_hash, class_name); 
     97 
     98                    if (last_remove == i + 1) { 
     99                        --d->n_vtable_max; 
     100                        last_remove = i; 
     101                    } 
    101102                } 
    102103            } 
    103104        }