pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:5217: Inside #if undefined(MEMORY_COUNT_DEBUG)
   this case is, AFAICS, to get the tracing right with    MEMORY_COUNT_DEBUG enabled. That case is handled below. */    return;    }   #endif       ref_to = find_mc_marker (thing);       if (!ref_to) {    ref_to = my_make_mc_marker (thing, visit_fn, extra); +  ref_to->la_count = 0; /* initialize so the queue doesn't order on +  uninitialized memory (... valgrind) */    MC_DEBUG_MSG (ref_to, "got new thing");    }    else if (ref_to->flags & MC_FLAG_INTERNAL) {    /* Ignore refs to the starting points. Can't treat them like other    * things anyway since the int_refs aren't valid. */    MC_DEBUG_MSG (ref_to, "ignored starting point");    return;    }    else    MC_DEBUG_MSG (ref_to, "got old thing");
pike.git/src/gc.c:6040:    void *extra)   {    int type = type_from_visit_fn(visit_dst);    struct mc_marker *ref_to = find_mc_marker(dst);    if (ref_to) {    /* Already visited or queued for visiting. */    return;    }       ref_to = my_make_mc_marker(dst, visit_dst, extra); +  ref_to->la_count = 0; /* initialize just so the queue doesn't order on +  uninitialized memory (... valgrind) */       if (type != PIKE_T_UNKNOWN) {    /* NB: low_mapping_insert() for object indices may throw errors    * if eg lfun::`==() throws an error. We therefore instead    * use the raw pointers as indices instead.    */    struct svalue s;    SET_SVAL(s, PIKE_T_INT, NUMBER_NUMBER, integer, (INT_TYPE)(ptrdiff_t)dst);    mc_wq_enqueue(ref_to);    low_mapping_insert(identify_loop_reverse, &s, Pike_sp-1, 0);