Branch: Tag:

2002-08-15

2002-08-15 14:50:28 by Marcus Comstedt <marcus@mc.pp.se>

Rename fatal -> Pike_fatal.

Rev: src/apply_low.h:1.7
Rev: src/array.c:1.129
Rev: src/array.h:1.41
Rev: src/backend.cmod:1.27
Rev: src/bignum.c:1.25
Rev: src/block_alloc.h:1.41
Rev: src/builtin.cmod:1.90
Rev: src/builtin_functions.c:1.435
Rev: src/callback.c:1.26
Rev: src/code/ia32.c:1.21
Rev: src/code/ppc32.c:1.16
Rev: src/code/ppc32.h:1.14
Rev: src/code/sparc.c:1.11
Rev: src/code/sparc.h:1.13
Rev: src/compilation.h:1.28
Rev: src/constants.c:1.38
Rev: src/cpp.c:1.102
Rev: src/cyclic.c:1.6
Rev: src/dlopen.c:1.32
Rev: src/docode.c:1.144
Rev: src/dynamic_buffer.c:1.16
Rev: src/dynamic_load.c:1.64
Rev: src/encode.c:1.151
Rev: src/error.c:1.86
Rev: src/fd_control.c:1.41
Rev: src/fdlib.c:1.52
Rev: src/fdlib.h:1.41
Rev: src/fsort_template.h:1.11
Rev: src/gc.c:1.185
Rev: src/gc.h:1.90
Rev: src/hashtable.c:1.11
Rev: src/interpret.c:1.263
Rev: src/interpret.h:1.110
Rev: src/interpret_functions.h:1.105
Rev: src/interpreter.h:1.76
Rev: src/iterators.cmod:1.26
Rev: src/language.yacc:1.289
Rev: src/las.c:1.297
Rev: src/lex.c:1.105
Rev: src/lexer.h:1.38
Rev: src/main.c:1.150
Rev: src/mapping.c:1.149
Rev: src/module_support.c:1.46
Rev: src/modules/Gmp/mpf.cmod:1.9
Rev: src/modules/Gmp/mpq.cmod:1.10
Rev: src/modules/Gmp/mpz_glue.c:1.107
Rev: src/modules/HTTPLoop/cache.c:1.17
Rev: src/modules/HTTPLoop/requestobject.c:1.21
Rev: src/modules/Image/colors.c:1.61
Rev: src/modules/Image/colortable.c:1.109
Rev: src/modules/Image/colortable_lookup.h:1.18
Rev: src/modules/Image/encodings/bmp.c:1.35
Rev: src/modules/Image/font.c:1.72
Rev: src/modules/Image/image_module.c:1.14
Rev: src/modules/Image/layers.c:1.79
Rev: src/modules/Odbc/odbc.c:1.30
Rev: src/modules/Oracle/oracle.c:1.70
Rev: src/modules/PDF/pdf_module.c:1.11
Rev: src/modules/Parser/html.c:1.152
Rev: src/modules/Parser/parser.c:1.14
Rev: src/modules/Perl/perlmod.c:1.25
Rev: src/modules/Pipe/pipe.c:1.49
Rev: src/modules/_Charset/charsetmod.c:1.35
Rev: src/modules/_Charset/iso2022.c:1.23
Rev: src/modules/files/file.c:1.239
Rev: src/modules/files/sendfile.c:1.57
Rev: src/modules/files/socket.c:1.63
Rev: src/modules/files/stat.c:1.22
Rev: src/modules/files/udp.c:1.37
Rev: src/modules/spider/xml.c:1.52
Rev: src/modules/sprintf/sprintf.c:1.93
Rev: src/modules/sybase/sybase.c:1.9
Rev: src/multiset.c:1.50
Rev: src/multiset.h:1.25
Rev: src/object.c:1.203
Rev: src/object.h:1.71
Rev: src/opcodes.c:1.122
Rev: src/operators.c:1.159
Rev: src/peep.c:1.72
Rev: src/pike_error.h:1.19
Rev: src/pike_macros.h:1.31
Rev: src/pike_memory.c:1.120
Rev: src/pike_search.c:1.9
Rev: src/pike_search_engine.c:1.8
Rev: src/pike_search_engine2.c:1.5
Rev: src/pike_threadlib.h:1.16
Rev: src/pike_types.c:1.194
Rev: src/pike_types.h:1.79
Rev: src/port.c:1.52
Rev: src/post_modules/GTK/source/support.c:1.33
Rev: src/post_modules/Unicode/normalize.c:1.9
Rev: src/preprocessor.h:1.51
Rev: src/program.c:1.441
Rev: src/queue.c:1.8
Rev: src/rbtree.c:1.10
Rev: src/rbtree_low.h:1.2
Rev: src/signal_handler.c:1.225
Rev: src/stralloc.c:1.143
Rev: src/stralloc.h:1.66
Rev: src/svalue.c:1.144
Rev: src/svalue.h:1.106
Rev: src/threads.c:1.180

30:      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.184 2002/06/11 17:30:38 mast Exp $"); + RCSID("$Id: gc.c,v 1.185 2002/08/15 14:49:21 marcus Exp $");      /* Run garbage collect approximately every time    * 20 percent of all arrays, objects and programs is
664:   static void gdb_gc_stop_here(void *a, int weak)   {   #if 0 -  if (!found_where) fatal("found_where is zero.\n"); +  if (!found_where) Pike_fatal("found_where is zero.\n");   #endif    fprintf(stderr,"***One %sref found%s. ",    weak ? "weak " : "",
1123:    "gc_touch() in pass %d.\n", a, Pike_in_gc);    }    -  if (!a) fatal("Got null pointer.\n"); +  if (!a) Pike_fatal("Got null pointer.\n");       switch (Pike_in_gc) {    case GC_PASS_PRETOUCH:
1195:    break;       default: -  fatal("debug_gc_touch() used in invalid gc pass.\n"); +  Pike_fatal("debug_gc_touch() used in invalid gc pass.\n");    }   }   
1203:   {    struct marker *m;    -  if (!a) fatal("Got null pointer.\n"); +  if (!a) Pike_fatal("Got null pointer.\n");    if(Pike_in_gc == GC_PASS_LOCATE)    {    if(check_for == a)
1214:    }       if (Pike_in_gc != GC_PASS_CHECK) -  fatal("gc check attempted in invalid pass.\n"); +  Pike_fatal("gc check attempted in invalid pass.\n");       m = get_marker(a);   
1460: Inside #if defined(PIKE_DEBUG)
   "gc_is_referenced() in pass %d.\n", a, Pike_in_gc);    }    -  if (!a) fatal("Got null pointer.\n"); +  if (!a) Pike_fatal("Got null pointer.\n");    if (Pike_in_gc != GC_PASS_MARK) -  fatal("gc_is_referenced() called in invalid gc pass.\n"); +  Pike_fatal("gc_is_referenced() called in invalid gc pass.\n");       if (gc_debug) {    m = find_marker(a);
1490: Inside #if defined(PIKE_DEBUG)
   "gc_external_mark3() in pass %d.\n", a, Pike_in_gc);    }    -  if (!a) fatal("Got null pointer.\n"); +  if (!a) Pike_fatal("Got null pointer.\n");       if(Pike_in_gc == GC_PASS_LOCATE)    {
1511: Inside #if defined(PIKE_DEBUG)
   }       if (Pike_in_gc != GC_PASS_CHECK) -  fatal("gc_external_mark() called in invalid gc pass.\n"); +  Pike_fatal("gc_external_mark() called in invalid gc pass.\n");       m=get_marker(a);    m->xrefs++;
1551: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr, "## Watched thing %p found in "    "gc_do_weak_free() in pass %d.\n", a, Pike_in_gc);    } -  if (!a) fatal("Got null pointer.\n"); +  if (!a) Pike_fatal("Got null pointer.\n");    if (Pike_in_gc != GC_PASS_MARK && Pike_in_gc != GC_PASS_ZAP_WEAK) -  fatal("gc_do_weak_free() called in invalid gc pass.\n"); +  Pike_fatal("gc_do_weak_free() called in invalid gc pass.\n");    if (gc_debug) {    if (!(m = find_marker(a)))    gc_fatal(a, 0, "gc_do_weak_free() got unknown object.\n");
1616: Inside #if defined(PIKE_DEBUG)
   }    if (Pike_in_gc != GC_PASS_MARK && Pike_in_gc != GC_PASS_CYCLE &&    Pike_in_gc != GC_PASS_ZAP_WEAK) -  fatal("gc_delayed_free() called in invalid gc pass.\n"); +  Pike_fatal("gc_delayed_free() called in invalid gc pass.\n");    if (gc_debug) {    if (!(m = find_marker(a)))    gc_fatal(a, 0, "gc_delayed_free() got unknown object (missed by pretouch pass).\n");    }    else m = get_marker(a);    if (*(INT32 *) a != 1) -  fatal("gc_delayed_free() called for thing that haven't got a single ref.\n"); +  Pike_fatal("gc_delayed_free() called for thing that haven't got a single ref.\n");    debug_malloc_touch(a);    delayed_freed++;   #else
1675: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr, "## Watched thing %p found in "    "gc_mark() in pass %d.\n", a, Pike_in_gc);    } -  if (!a) fatal("Got null pointer.\n"); +  if (!a) Pike_fatal("Got null pointer.\n");    if (Pike_in_gc != GC_PASS_MARK && Pike_in_gc != GC_PASS_ZAP_WEAK) -  fatal("gc mark attempted in invalid pass.\n"); +  Pike_fatal("gc mark attempted in invalid pass.\n");    if (!*(INT32 *) a)    gc_fatal(a, 0, "Marked a thing without refs.\n");    if (m->weak_refs < 0)
1780: Inside #if defined(PIKE_DEBUG)
  {   #ifdef PIKE_DEBUG    if (Pike_in_gc != GC_PASS_CYCLE) -  fatal("Use of the gc frame stack outside the cycle check pass.\n"); +  Pike_fatal("Use of the gc frame stack outside the cycle check pass.\n");   #endif    while (gc_rec_top) {   #ifdef GC_STACK_DEBUG
1824: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    if (Pike_in_gc != GC_PASS_CYCLE) -  fatal("Use of the gc frame stack outside the cycle check pass.\n"); +  Pike_fatal("Use of the gc frame stack outside the cycle check pass.\n");    CHECK_POP_FRAME(beg);    CHECK_POP_FRAME(pos);    if (beg == pos)
1923: Inside #if defined(PIKE_DEBUG)
      debug_malloc_touch(x);    -  if (!x) fatal("Got null pointer.\n"); -  if (m->data != x) fatal("Got wrong marker.\n"); +  if (!x) Pike_fatal("Got null pointer.\n"); +  if (m->data != x) Pike_fatal("Got wrong marker.\n");    if (Pike_in_gc != GC_PASS_CYCLE) -  fatal("GC cycle push attempted in invalid pass.\n"); +  Pike_fatal("GC cycle push attempted in invalid pass.\n");    if (gc_debug && !(m->flags & GC_PRETOUCHED))    gc_fatal(x, 0, "gc_cycle_push() called for untouched thing.\n");    if ((!(m->flags & GC_NOT_REFERENCED) || m->flags & GC_MARKED) &&
1985: Inside #if defined(PIKE_DEBUG)
   struct gc_frame *l = gc_rec_top;   #ifdef PIKE_DEBUG    if (!gc_rec_top) -  fatal("Expected a gc_cycle_pop entry in gc_rec_top.\n"); +  Pike_fatal("Expected a gc_cycle_pop entry in gc_rec_top.\n");   #endif    gc_rec_top = l->back;    if (l->frameflags & GC_POP_FRAME) {
2156: Inside #if defined(PIKE_DEBUG)
  live_recurse:   #ifdef PIKE_DEBUG    if (m->flags & GC_LIVE) -  fatal("Shouldn't live recurse when there's nothing to do.\n"); +  Pike_fatal("Shouldn't live recurse when there's nothing to do.\n");   #endif    m->flags |= GC_LIVE|GC_LIVE_RECURSE;    debug_malloc_touch(x);
2199: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr, "## Watched thing %p found in "    "gc_cycle_pop() in pass %d.\n", a, Pike_in_gc);    } -  if (!a) fatal("Got null pointer.\n"); +  if (!a) Pike_fatal("Got null pointer.\n");    if (Pike_in_gc != GC_PASS_CYCLE) -  fatal("GC cycle pop attempted in invalid pass.\n"); +  Pike_fatal("GC cycle pop attempted in invalid pass.\n");    if (!(m->flags & GC_CYCLE_CHECKED))    gc_fatal(a, 0, "Marker being popped doesn't have GC_CYCLE_CHECKED.\n");    if ((!(m->flags & GC_NOT_REFERENCED) || m->flags & GC_MARKED) &&
2314: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr, "## Watched thing %p found in "    "gc_do_free() in pass %d.\n", a, Pike_in_gc);    } -  if (!a) fatal("Got null pointer.\n"); +  if (!a) Pike_fatal("Got null pointer.\n");    if (Pike_in_gc != GC_PASS_FREE) -  fatal("gc free attempted in invalid pass.\n"); +  Pike_fatal("gc free attempted in invalid pass.\n");   #endif       m=find_marker(debug_malloc_pass(a));
2440: Inside #if defined(PIKE_DEBUG)
  #endif    }    if(num_objects < 0) -  fatal("Panic, less than zero objects!\n"); +  Pike_fatal("Panic, less than zero objects!\n");   #endif       last_gc=TIME(0);
2467: Inside #if defined(PIKE_DEBUG)
   n += gc_touch_all_objects();    gc_touch_all_strings();    if (n != (unsigned) num_objects) -  fatal("Object count wrong before gc; expected %d, got %d.\n", num_objects, n); +  Pike_fatal("Object count wrong before gc; expected %d, got %d.\n", num_objects, n);    GC_VERBOSE_DO(fprintf(stderr, "| pretouch: %u things\n", n));    }   #endif
2557: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    if (gc_rec_top) -  fatal("gc_rec_top not empty at end of cycle check pass.\n"); +  Pike_fatal("gc_rec_top not empty at end of cycle check pass.\n");    if (NEXT(&rec_list) || gc_rec_last != &rec_list || gc_rec_top) -  fatal("Recurse list not empty or inconsistent after cycle check pass.\n"); +  Pike_fatal("Recurse list not empty or inconsistent after cycle check pass.\n");    if (gc_ext_weak_refs != orig_ext_weak_refs) -  fatal("gc_ext_weak_refs changed from %"PRINTSIZET"u " +  Pike_fatal("gc_ext_weak_refs changed from %"PRINTSIZET"u "    "to %"PRINTSIZET"u in cycle check pass.\n",    orig_ext_weak_refs, gc_ext_weak_refs);   #endif
2617: Inside #if defined(PIKE_DEBUG)
   n += gc_touch_all_objects();    gc_touch_all_strings();    if (n != (unsigned) num_objects) -  fatal("Object count wrong in gc; expected %d, got %d.\n", num_objects, n); +  Pike_fatal("Object count wrong in gc; expected %d, got %d.\n", num_objects, n);    get_marker(rec_list.data)->flags |= GC_MIDDLETOUCHED;   #if 0 /* Temporarily disabled - Hubbe */   #ifdef DEBUG_MALLOC
2632: Inside #if defined(PIKE_DEBUG), #if 0 /* Temporarily disabled - Hubbe */ and #if defined(DEBUG_MALLOC)
   Pike_in_gc = 0;    describe(m->data);    Pike_in_gc = GC_PASS_MIDDLETOUCH; -  fatal("Fatal in garbage collector.\n"); +  Pike_fatal("Fatal in garbage collector.\n");    }   #endif   #endif
2704: Inside #if defined(PIKE_DEBUG)
   gc_internal_program = (struct program *) (ptrdiff_t) -1;    gc_internal_object = (struct object *) (ptrdiff_t) -1;    -  if(fatal_after_gc) fatal("%s", fatal_after_gc); +  if(fatal_after_gc) Pike_fatal("%s", fatal_after_gc);   #endif       Pike_in_gc=GC_PASS_KILL;
2773: Inside #if defined(PIKE_DEBUG)
   n += gc_touch_all_objects();    /* gc_touch_all_strings(); */    if (n != (unsigned) num_objects) -  fatal("Object count wrong after gc; expected %d, got %d.\n", num_objects, n); +  Pike_fatal("Object count wrong after gc; expected %d, got %d.\n", num_objects, n);    GC_VERBOSE_DO(fprintf(stderr, "| posttouch: %u things\n", n));    }    if (gc_extra_refs) -  fatal("Lost track of %d extra refs to things in gc.\n", gc_extra_refs); -  if(fatal_after_gc) fatal("%s", fatal_after_gc); +  Pike_fatal("Lost track of %d extra refs to things in gc.\n", gc_extra_refs); +  if(fatal_after_gc) Pike_fatal("%s", fatal_after_gc);   #endif       Pike_in_gc=0;