Branch: Tag:

2006-02-18

2006-02-18 05:08:25 by Martin Stjernholm <mast@lysator.liu.se>

More thorough fix for the problem when multiset data blocks are resized
during the gc mark and cycle check passes.

Rev: src/gc.c:1.272
Rev: src/gc.h:1.120
Rev: src/multiset.c:1.98

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.271 2006/01/23 14:00:16 mast Exp $ + || $Id: gc.c,v 1.272 2006/02/18 05:08:24 mast Exp $   */      #include "global.h"
2066:    }   }    + void gc_move_marker (void *old, void *new) + { +  struct marker *m = get_marker (debug_malloc_pass (old)); +  + #ifdef PIKE_DEBUG +  if (!old) Pike_fatal("Got null pointer in old.\n"); +  if (!new) Pike_fatal("Got null pointer in new.\n"); +  if (!m) Pike_fatal ("Have no marker for old block %p.\n", old); +  if (find_marker (new)) +  Pike_fatal ("New block %p already got a marker.\n", new); +  if (!Pike_in_gc || Pike_in_gc >= GC_PASS_FREE) +  Pike_fatal ("gc move mark attempted in invalid pass.\n"); + #endif +  +  move_marker (m, new); + } +    PMOD_EXPORT void gc_cycle_enqueue(gc_cycle_check_cb *checkfn, void *data, int weak)   {    struct gc_link_frame *l = alloc_link_frame();