From 5393589ec2d898a02c52adf9125a592d3d7ff829 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 26 May 2023 12:15:24 +0200 Subject: Disable counts verification if matched but not executed in resolve_members() --- libbuild2/algorithm.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libbuild2/algorithm.cxx') diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx index 966c7a8..cf972e7 100644 --- a/libbuild2/algorithm.cxx +++ b/libbuild2/algorithm.cxx @@ -1283,7 +1283,10 @@ namespace build2 throw failed (); if ((r = g.group_members (a)).members != nullptr) + { + g.ctx.resolve_count.fetch_add (1, memory_order_relaxed); break; + } // Unlock and to execute ... // @@ -1300,6 +1303,10 @@ namespace build2 // we would have already known the members list) and we really do need // to execute it now. // + // Note that while it might be tempting to decrement resolve_count + // here, there is no guarantee that we were the ones who have matched + // this target. + // { phase_switch ps (g.ctx, run_phase::execute); execute_direct_sync (a, g); -- cgit v1.1