| 1092 | } |
| 1093 | |
| 1094 | void _serverPanic(const char *file, int line, const char *msg, ...) { |
| 1095 | g_fInCrash = true; |
| 1096 | va_list ap; |
| 1097 | va_start(ap,msg); |
| 1098 | char fmtmsg[256]; |
| 1099 | vsnprintf(fmtmsg,sizeof(fmtmsg),msg,ap); |
| 1100 | va_end(ap); |
| 1101 | |
| 1102 | bugReportStart(); |
| 1103 | serverLog(LL_WARNING,"------------------------------------------------"); |
| 1104 | serverLog(LL_WARNING,"!!! Software Failure. Press left mouse button to continue"); |
| 1105 | serverLog(LL_WARNING,"Guru Meditation: %s #%s:%d",fmtmsg,file,line); |
| 1106 | |
| 1107 | if (g_pserver->crashlog_enabled) { |
| 1108 | #if defined HAVE_BACKTRACE || defined UNW_LOCAL_ONLY |
| 1109 | logStackTrace(NULL, 1); |
| 1110 | #endif |
| 1111 | printCrashReport(); |
| 1112 | } |
| 1113 | |
| 1114 | // remove the signal handler so on abort() we will output the crash report. |
| 1115 | removeSignalHandlers(); |
| 1116 | bugReportEnd(0, 0); |
| 1117 | } |
| 1118 | |
| 1119 | void bugReportStart(void) { |
| 1120 | pthread_mutex_lock(&bug_report_start_mutex); |
nothing calls this directly
no test coverage detected