[Openmp-commits] [openmp] [OpenMP] Fix a few race conditions in the OpenMP runtime (PR #207281)

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Mon Jul 6 05:10:25 PDT 2026


================
@@ -234,8 +235,9 @@ lookupPtr(ValueKind Kind, bool IsReadonly, bool ForceTeamState) {
 /// update ICV values we can declare in global scope.
 template <typename Ty, ValueKind Kind> struct Value {
   [[gnu::flatten, gnu::always_inline]] operator Ty() {
-    return lookup(/*IsReadonly=*/true, /*IdentTy=*/nullptr,
-                  /*ForceTeamState=*/false);
+    return atomic::load(&lookup(/*IsReadonly=*/true, /*IdentTy=*/nullptr,
----------------
jhuber6 wrote:

Didn't manifest when I was instrumenting this, but it's possible

https://github.com/llvm/llvm-project/pull/207281


More information about the Openmp-commits mailing list