From 912ac87012ffc2fd0c6fb21823a0244c787ce5ba Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Apr 2022 07:38:22 +0200 Subject: Avoid locking target set if in load phase --- libbuild2/file.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libbuild2/file.cxx') diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx index d789d20..31db943 100644 --- a/libbuild2/file.cxx +++ b/libbuild2/file.cxx @@ -2880,6 +2880,9 @@ namespace build2 if (!t || *t == nullptr) { + // Note: we need the lock because process_path() call below is not + // MT-safe. + // pair r (insert_target (trace, ctx, tt, p)); t = &r.first; -- cgit v1.1