Branch: Tag:

2002-12-01

2002-12-01 00:16:55 by Martin Stjernholm <mast@lysator.liu.se>

Some debug improvements when the refcount is wrong.

Rev: src/array.c:1.133
Rev: src/iterators.cmod:1.31
Rev: src/mapping.c:1.157
Rev: src/multiset.c:1.60
Rev: src/object.c:1.211
Rev: src/program.c:1.464
Rev: src/stralloc.c:1.150

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: array.c,v 1.132 2002/10/11 01:39:28 nilsson Exp $ + || $Id: array.c,v 1.133 2002/12/01 00:16:54 mast Exp $   */      #include "global.h"
25:   #include "bignum.h"   #include "cyclic.h"    - RCSID("$Id: array.c,v 1.132 2002/10/11 01:39:28 nilsson Exp $"); + RCSID("$Id: array.c,v 1.133 2002/12/01 00:16:54 mast Exp $");      PMOD_EXPORT struct array empty_array=   {
128: Inside #if defined(PIKE_DEBUG)
  #ifdef PIKE_DEBUG    if(v == & empty_array || v == &weak_empty_array || v == &weak_shrink_empty_array)    Pike_fatal("Tried to free some *_empty_array.\n"); -  if (v->refs) +  if (v->refs) { + #ifdef DEBUG_MALLOC +  describe_something(v, T_ARRAY, 0,2,0, NULL); + #endif    Pike_fatal("Freeing array with %d refs.\n", v->refs); -  +  }   #endif      #ifdef PIKE_DEBUG