Fix potential race in bugReportStart

this race would only happen when two threads paniced at the same time,
and even then the only consequence is some extra log lines.

race reported in #7391
This commit is contained in:
Oran Agra 2020-08-04 12:24:45 +03:00
parent 90b717e723
commit 81f8524a12

View File

@ -55,7 +55,7 @@ typedef ucontext_t sigcontext_t;
#endif #endif
/* Globals */ /* Globals */
static int bug_report_start = 0; /* True if bug report header was already logged. */ static _Atomic int bug_report_start = 0; /* True if bug report header was already logged. */
/* Forward declarations */ /* Forward declarations */
void bugReportStart(void); void bugReportStart(void);