diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-06-02 06:10:34 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-06-02 06:10:34 +0200 |
commit | 048bcc1604a7e8aca666e219c0fdc3cd5517029e (patch) | |
tree | c710fd799f1089cfaf06cf1a520c072c0436dfd1 /libbuild2/cc/common.cxx | |
parent | 2dd1f9fa5a7427096b74aa85258ec2feeb93c104 (diff) |
Fix data race in library metadata protocol logic
Diffstat (limited to 'libbuild2/cc/common.cxx')
-rw-r--r-- | libbuild2/cc/common.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libbuild2/cc/common.cxx b/libbuild2/cc/common.cxx index c423c37..07a4d48 100644 --- a/libbuild2/cc/common.cxx +++ b/libbuild2/cc/common.cxx @@ -382,9 +382,10 @@ namespace build2 for (const prerequisite_target& pt: l.prerequisite_targets[a]) { // Note: adhoc prerequisites are not part of the library metadata - // protocol (and we should check for adhoc first to avoid races). + // protocol (and we should check for adhoc first to avoid races + // during execute). // - if (pt == nullptr || pt.adhoc ()) + if (pt.adhoc () || pt == nullptr) continue; if (marked (pt)) |