From 81f8524a1282d4ea192fd0b0ee5e3f6cd2e673d3 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Tue, 4 Aug 2020 12:24:45 +0300 Subject: [PATCH] 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 --- src/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug.c b/src/debug.c index 3b40e685b..5cfda59c9 100644 --- a/src/debug.c +++ b/src/debug.c @@ -55,7 +55,7 @@ typedef ucontext_t sigcontext_t; #endif /* 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 */ void bugReportStart(void);