From e3c1bd90fd2b26225dbcbda27472ad72f1c575d4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 15 Jun 2023 09:48:24 +0200 Subject: Fix incorrect memory order in target::matched() call --- libbuild2/dyndep.cxx | 2 +- libbuild2/target.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libbuild2/dyndep.cxx b/libbuild2/dyndep.cxx index 7fe38d1..c0360f0 100644 --- a/libbuild2/dyndep.cxx +++ b/libbuild2/dyndep.cxx @@ -139,7 +139,7 @@ namespace build2 { diag_record dr; - if (pt.matched (a)) + if (pt.matched (a, memory_order_acquire)) { recipe_function* const* rf (pt[a].recipe.target ()); if (rf == nullptr || *rf != &noop_action) diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx index 69714fc..aa3df7f 100644 --- a/libbuild2/target.hxx +++ b/libbuild2/target.hxx @@ -869,7 +869,7 @@ namespace build2 // This function can only be called during the match or execute phases. // // If you need to observe something in the matched target (e.g., the - // matched rule), use memory_order_acquire. + // matched rule or recipe), use memory_order_acquire. // bool matched (action, memory_order mo = memory_order_relaxed) const; -- cgit v1.1