From b33bf3f7042464ac4f6e187fc487ee42668fcef7 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 26 Aug 2021 22:17:51 +0100 Subject: Correct race condition and incorrect usage of `condition_signal` outside of a mutex lock --- src/check_stmt.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/check_stmt.cpp') diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 7b039e001..6fc098e6a 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -704,6 +704,7 @@ void add_constant_switch_case(CheckerContext *ctx, Map *seen, Oper if (operand.value.kind == ExactValue_Invalid) { return; } + HashKey key = hash_exact_value(operand.value); TypeAndToken *found = map_get(seen, key); if (found != nullptr) { -- cgit v1.2.3