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: program.c,v 1.463 2002/11/25 03:16:08 mast Exp $ + || $Id: program.c,v 1.464 2002/12/01 00:16:55 mast Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.463 2002/11/25 03:16:08 mast Exp $"); + RCSID("$Id: program.c,v 1.464 2002/12/01 00:16:55 mast Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
1834:   {    unsigned INT16 e;    + #ifdef PIKE_DEBUG +  if (p->refs) { + #ifdef DEBUG_MALLOC +  describe_something(p, T_PROGRAM, 0,2,0, NULL); + #endif +  Pike_fatal("Program to be freed still got %d references.\n", p->refs); +  } + #endif +     if(p->parent)    {    /* Make sure to break the circularity... */