diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-10-28 14:07:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-10-28 14:07:19 +0200 |
commit | ebc6dcfe9e7eb7aeddeff808c1c0498508183263 (patch) | |
tree | 97a2a70cb1fd60f00699a6c8a1f4266ca2b1b02a /libbuild2/algorithm.cxx | |
parent | 4eb1b56b8e0e2451a563c75946a600d875d50e5a (diff) |
Fix data race in ad hoc member state when group is postponed
Diffstat (limited to 'libbuild2/algorithm.cxx')
-rw-r--r-- | libbuild2/algorithm.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx index 16f1503..d2d1eb6 100644 --- a/libbuild2/algorithm.cxx +++ b/libbuild2/algorithm.cxx @@ -2077,7 +2077,11 @@ namespace build2 case target_state::unchanged: break; case target_state::postponed: - ts = t[a].state = target_state::unchanged; + // Keep the target state postponed (see group_action() for details) + // but translate the result from postponed to unchanged, similar to + // executed_state_impl(). + // + ts = target_state::unchanged; break; case target_state::group: ts = (*t.group)[a].state; |