pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:537:    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 + #ifdef PIKE_DEBUG +  THREAD_T save_threads_disabled_thread = threads_disabled_thread; +  threads_disabled_thread = th_self(); + #endif    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--; -  + #ifdef PIKE_DEBUG +  threads_disabled_thread = save_threads_disabled_thread;   #endif -  + #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))