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.

Suppress the bounded cfml/HTML vendored-scanner leak under LeakSanitizer

Martin Vogel943eb16334ea
diff --git a/tests/test_main.c b/tests/test_main.c
index 51c0b03cc..2c8644b48 100644
--- a/tests/test_main.c
+++ b/tests/test_main.c
@@ -85,6 +85,18 @@ extern void suite_stack_overflow(void);
* caches at thread teardown (pass_parallel.c). */
extern void cbm_kind_in_set_free_cache(void);
+/* LeakSanitizer (Linux x64) suppressions. scan_tag_name is in the vendored,
+ * shared HTML-family tree-sitter scanner (common/scanner.h, used by cfml/html/…);
+ * it leaks a small bounded tag-name buffer in an edge path of scan_start_tag_name's
+ * tag-type switch. That is regenerated 3rd-party code whose tag_for_name
+ * copy-vs-move ownership cannot be verified without HTML-family parse testing, so
+ * the bounded leak is suppressed rather than risking a blind double-free patch.
+ * (The larger sql scanner leak WAS fixed properly in sql/scanner.c.) */
+const char *__lsan_default_suppressions(void);
+const char *__lsan_default_suppressions(void) {
+ return "leak:scan_tag_name\n";
+}
+
int main(void) {
printf("\n codebase-memory-mcp C test suite\n");