aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_general.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-07-07 23:35:16 +0100
committergingerBill <bill@gingerbill.org>2023-07-07 23:35:16 +0100
commit62031c24a2afeb9dd15a85e3e15a78860900be6a (patch)
treeef5b235be3b2c9f9f7e03704ff586e3bd77b6f25 /src/llvm_backend_general.cpp
parentaa38889704f3518878aeb82cb03d63c8b592ac0e (diff)
Add extra mutex guards around module value access
Diffstat (limited to 'src/llvm_backend_general.cpp')
-rw-r--r--src/llvm_backend_general.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp
index 676069120..f0bbaafb7 100644
--- a/src/llvm_backend_general.cpp
+++ b/src/llvm_backend_general.cpp
@@ -2730,7 +2730,10 @@ gb_internal lbValue lb_find_procedure_value_from_entity(lbModule *m, Entity *e)
} else {
array_add(&m->missing_procedures_to_check, missing_proc);
}
+
+ rw_mutex_shared_lock(&m->values_mutex);
found = map_get(&m->values, e);
+ rw_mutex_shared_unlock(&m->values_mutex);
if (found) {
return *found;
}