pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:196: Inside #if defined(PIKE_DEBUG)
  #ifdef PIKE_DEBUG    if(Pike_sp - Pike_interpreter.evaluator_stack < Pike_interpreter.recoveries->stack_pointer)    Pike_fatal("Stack error in error.\n");   #endif       pop_n_elems(Pike_sp - Pike_interpreter.evaluator_stack - Pike_interpreter.recoveries->stack_pointer);    Pike_mark_sp = Pike_interpreter.mark_stack + Pike_interpreter.recoveries->mark_sp;      #if defined(DEBUG_MALLOC) && defined(PIKE_DEBUG)    /* This will tell us where the value was caught (I hope) */ -  if(TYPEOF(throw_value) <= MAX_REF_TYPE) +  if(REFCOUNTED_TYPE(TYPEOF(throw_value)))    {    debug_malloc_update_location(throw_value.u.refs,    Pike_interpreter.recoveries->file);    debug_malloc_touch(throw_value.u.refs);    }   #endif      #ifdef TRACE_UNFINISHED_TYPE_FIELDS    accept_unfinished_type_fields--;   #endif
pike.git/src/error.c:299:   PMOD_EXPORT void make_error (const char *fmt, ...)   /* Creates a general error container like Pike_error but doesn't throw    * it, instead it is left on the stack. */   {    va_list args;    va_start (args,fmt);    va_make_error (fmt,args);    va_end (args);   }    + /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void Pike_error(const char *fmt,...) ATTRIBUTE((noreturn))   {    va_list args;    va_start(args,fmt);    va_error(fmt,args);    va_end(args);   }      PMOD_EXPORT DECLSPEC(noreturn) void new_error(const char *name,    const char *text,
pike.git/src/error.c:362:    push_int(0);    push_int(0);    }       if (name)    push_text(name);    else    push_int(0);       for (i=-args; i; i++) { -  if (TYPEOF(oldsp[i]) <= PIKE_T_FLOAT) { +  if (TYPEOF(oldsp[i]) <= MAX_TYPE) {    push_svalue(oldsp + i);    } else {    char buffer[50];    sprintf(buffer, "<Svalue:0x%04x:0x%04x:%p>",    TYPEOF(oldsp[i]), SUBTYPEOF(oldsp[i]), oldsp[i].u.ptr);    push_text(buffer);    }    }       f_aggregate(args + 3);
pike.git/src/error.c:507:       if(Pike_sp && Pike_interpreter.evaluator_stack &&    master_object && master_object->prog)    {    JMP_BUF jmp;    struct callback_list saved_eval_cbs = evaluator_callbacks;    /* Simulate threads_disabled to avoid thread switches or any other    * evaluator stuff while we let the master describe the backtrace    * below. Doing it the naughty way without going through    * init_threads_disable etc to avoid hanging on runaway locks. */ + #ifdef PIKE_THREADS    threads_disabled++; -  + #endif    MEMSET (&evaluator_callbacks, 0, sizeof (evaluator_callbacks));    if (SETJMP (jmp))    fprintf(stderr,"Got exception when trying to describe backtrace.\n");    else {    jmp.severity = THROW_EXIT; /* Don't want normal exit code to run here. */    push_error("Backtrace at time of fatal:\n");    APPLY_MASTER("describe_backtrace",1);    if(TYPEOF(Pike_sp[-1]) == PIKE_T_STRING)    write_to_stderr(Pike_sp[-1].u.string->str, Pike_sp[-1].u.string->len);    }    UNSETJMP (jmp); -  + #ifdef PIKE_THREADS    threads_disabled--; -  + #endif    evaluator_callbacks = saved_eval_cbs;    }else{    fprintf(stderr,"No stack - no backtrace.\n");    }    fflush(stderr);    do_abort();   }    -  + /* coverity[+kill] */   PMOD_EXPORT DECLSPEC(noreturn) void debug_fatal(const char *fmt, ...) ATTRIBUTE((noreturn))   {    va_list args;    va_start(args,fmt);    debug_va_fatal (fmt, args);    va_end (args);   }      #if 1   
pike.git/src/error.c:664:    pop_n_elems(args);    apply_current (generic_err_backtrace_fun, 0);    break;    default:    index_error("error->`[]", Pike_sp-args, args, NULL, Pike_sp-args,    "Index %"PRINTPIKEINT"d is out of range 0..1.\n", ind);    break;    }   }    + static void f_error__sizeof(INT32 args) + { +  pop_n_elems(args); +  push_int(2); + } +  + static void f_error__indices(INT32 args) + { +  pop_n_elems(args); +  push_int(0); +  push_int(1); +  f_aggregate(2); + } +  + static void f_error__values(INT32 args) + { +  pop_n_elems(args); +  apply_current(generic_err_message_fun, 0); +  apply_current(generic_err_backtrace_fun, 0); +  f_aggregate(2); + } +    /*! @decl string describe()    *!    *! Return a readable error report that includes the backtrace.    */   static void f_error_describe(INT32 args)   {    pop_n_elems(args);    ref_push_object(Pike_fp->current_object);    APPLY_MASTER("describe_backtrace",1);   }