pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: mapping.c,v 1.72 2000/04/12 18:40:12 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.73 2000/04/15 05:05:28 hubbe Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "pike_macros.h"   #include "language.h"   #include "error.h"   #include "pike_memory.h"   #include "dynamic_buffer.h"
pike.git/src/mapping.c:1700: Inside #if defined(PIKE_DEBUG)
   if(!m->data)    fatal("Mapping has no data block.\n");       if (!m->data->refs)    fatal("Mapping data block has zero refs.\n");       if(m->next && m->next->prev != m)    fatal("Mapping ->next->prev != mapping.\n");       if(m->debug_size != md->size) -  fatal("Mapping zapping detected!\n"); +  { +  fprintf(stderr,"--MAPPING ZAPPING, mapping:\n"); +  describe(m); +  fprintf(stderr,"--MAPPING ZAPPING, mapping data:\n"); +  describe(md); +  fatal("Mapping zapping detected (%d != %d)!\n",m->debug_size,md->size); +  }       if(m->prev)    {    if(m->prev->next != m)    fatal("Mapping ->prev->next != mapping.\n");    }else{    if(first_mapping != m)    fatal("Mapping ->prev == 0 but first_mapping != mapping.\n");    }   
pike.git/src/mapping.c:1851:      void gc_check_all_mappings(void)   {    struct mapping *m;       for(m=first_mapping;m;m=m->next)    {   #ifdef DEBUG_MALLOC    if (((int)m->data) == 0x55555555) {    fprintf(stderr, "** Zapped mapping in list of active mappings!\n"); -  describe_something(m, T_MAPPING, 1); +  describe_something(m, T_MAPPING, 0,2,0);    fatal("Zapped mapping in list of active mappings!\n");    }   #endif /* DEBUG_MALLOC */       gc_check_mapping(m);   #ifdef PIKE_DEBUG    if(d_flag > 1) check_mapping_type_fields(m);   #endif    }   }