Branch: Tag:

2000-04-13

2000-04-13 20:14:35 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more debug...

Rev: src/backend.c:1.46
Rev: src/constants.c:1.21
Rev: src/gc.c:1.57
Rev: src/object.c:1.105
Rev: src/object.h:1.41
Rev: src/queue.c:1.3
Rev: src/svalue.c:1.68

29:      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.56 2000/04/13 02:11:25 hubbe Exp $"); + RCSID("$Id: gc.c,v 1.57 2000/04/13 20:14:35 hubbe Exp $");      /* Run garbage collect approximate every time we have    * 20 percent of all arrays, objects and programs is
545: Inside #if defined(PIKE_DEBUG)
   if(check_for == (void *)1 && gc_do_free(a))    {    struct marker *m=get_marker(a); +  int t=attempt_to_identify(a); +  if(t != T_STRING && t != T_UNKNOWN) +  {    fprintf(stderr,"**Reference to object to free in referenced object!\n");    fprintf(stderr," has %ld references, while gc() found %ld + %ld external.\n",(long)*(INT32 *)a,(long)m->refs,(long)m->xrefs);    describe(a);
552: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr,"##### Continuing search for more bugs....\n");    fatal_after_gc="Reference to object to free in referenced object!\n";    } +  }    return 0;    }   #endif
631: Inside #if defined(PIKE_DEBUG) and #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    if(master_object) gc_external_mark2(master_object,0," &master_object"); +  { +  extern struct mapping *builtin_constants; +  if(builtin_constants) +  gc_external_mark2(builtin_constants,0," &builtin_constants"); +  }   #endif       found_where=" in a module";
710: Inside #if defined(PIKE_DEBUG)
   if(check_for == (void *)1 && gc_do_free(a))    {    struct marker *m=get_marker(a); +  int t=attempt_to_identify(a); +  if(t != T_STRING && t != T_UNKNOWN) +  {    fprintf(stderr,"EXTERNAL Reference to object to free%s!\n",in?in:"");    fprintf(stderr," has %ld references, while gc() found %ld + %ld external.\n",(long)*(INT32 *)a,(long)m->refs,(long)m->xrefs);    if(where) describe_location(0,T_UNKNOWN,where);
718: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr,"##### Continuing search for more bugs....\n");    fatal_after_gc="EXTERNAL Reference to object to free.\n";    } +  }       return 0;    }
754: Inside #if defined(PIKE_DEBUG)
   INT32 refs=m->refs;    INT32 xrefs=m->xrefs;    TYPE_T t=attempt_to_identify(a); -  -  fprintf(stderr,"**gc_is_referenced failed, object has %ld references, while gc() found %ld + %ld external.\n",(long)*(INT32 *)a,(long)refs,(long)xrefs); +  if(t != T_STRING && t != T_UNKNOWN) +  { +  fprintf(stderr,"**gc_is_referenced failed, object has %ld references, while gc() found %ld + %ld external. (type=%d)\n",(long)*(INT32 *)a,(long)refs,(long)xrefs,t);    describe_something(a, t, 1);       locate_references(a);
765: Inside #if defined(PIKE_DEBUG)
   refs,    xrefs);    } +  }       return !(m->flags & GC_REFERENCED);   }
815: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    if(master_object) gc_external_mark2(master_object,0," &master_object"); +  { +  extern struct mapping *builtin_constants; +  if(builtin_constants) +  gc_external_mark2(builtin_constants,0," &builtin_constants"); +  }   #endif       call_callback(& gc_callbacks, (void *)0);