Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

fix(mem): the MSan guard in the spill store goes through sanitized.h

Martin Vogeld70b79417978
diff --git a/internal/cbm/result_spill.c b/internal/cbm/result_spill.c
index b79dc0e6c..89716398a 100644
--- a/internal/cbm/result_spill.c
+++ b/internal/cbm/result_spill.c
@@ -29,13 +29,11 @@
* lane on #2202: offset 4087, then 6714, of a 6,952-byte block). Under MSan
* the image is declared defined right before the write; every other build
* compiles this to nothing. */
-#if defined(__has_feature)
+#include "foundation/sanitized.h" /* __has_feature exists everywhere, cppcheck included */
#if __has_feature(memory_sanitizer)
#include <sanitizer/msan_interface.h>
#define SPILL_IMAGE_DEFINED(p, n) __msan_unpoison((p), (n))
-#endif
-#endif
-#ifndef SPILL_IMAGE_DEFINED
+#else
#define SPILL_IMAGE_DEFINED(p, n) ((void)0)
#endif