aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-06-14 12:17:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-06-14 12:17:02 +0200
commitdd05354924c71c1074a589db9b7475e81f212d39 (patch)
tree4df174add4e6d8e74875056f64b529be458837a1 /libbuild2
parenta09cbea449850c679e27c83e4272bea399151996 (diff)
Instrument header cache inconsistency assert with additional info (GH issue #390)
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/cc/compile-rule.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx
index 7629ed5..95ba89f 100644
--- a/libbuild2/cc/compile-rule.cxx
+++ b/libbuild2/cc/compile-rule.cxx
@@ -3213,7 +3213,21 @@ namespace build2
if (f != nullptr)
{
//cache_cls.fetch_add (1, memory_order_relaxed);
+
+#if 0
assert (r.first == f);
+#else
+ if (r.first != f)
+ {
+ info << "inconsistent header cache content" <<
+ info << "encountered: " << *f <<
+ info << "expected: " << *r.first <<
+ info << "please report at "
+ << "https://github.com/build2/build2/issues/390";
+
+ assert (r.first == f);
+ }
+#endif
}
}