Branch: Tag:

2008-05-14

2008-05-14 21:09:07 by Martin Stjernholm <mast@lysator.liu.se>

Fixed cycle check bug when following strong refs to a thing that got
more than one pointing to it. Also fixed a bug where refs rotated
things could get a strong flag on them. In practice this bug was
mostly visible by occasional fatals in rtldebug mode.

Rev: src/gc.c:1.316

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: gc.c,v 1.315 2008/05/13 19:03:59 mast Exp $ + || $Id: gc.c,v 1.316 2008/05/14 21:09:07 mast Exp $   */      #include "global.h"
2912:    if (break_pos) {    struct gc_rec_frame *rot_beg;    rot_beg = rotate_rec_stack (cycle_frame, break_pos); -  cycle_frame->rf_flags = -  (cycle_frame->rf_flags & ~(GC_PREV_WEAK|GC_PREV_BROKEN)) | GC_PREV_STRONG; +  rot_beg->rf_flags &= ~(GC_PREV_WEAK|GC_PREV_BROKEN); +  if (weak >= 0) rot_beg->rf_flags |= GC_PREV_STRONG;       if (rot_beg->cycle_id != break_pos->prev->cycle_id)    /* Ensure that the cycle id frame is kept deepest in the