From e3ec9f44bbe2c67f977bb8fab500129d8ce638f8 Mon Sep 17 00:00:00 2001 From: Charles Nicholson Date: Sat, 30 Dec 2023 00:10:19 -0500 Subject: [PATCH] shut up memory sanitizer about stl_tree in doctest --- Makefile | 7 +++++++ memory-sanitize-ignorelist.txt | 1 + 2 files changed, 8 insertions(+) create mode 100644 memory-sanitize-ignorelist.txt diff --git a/Makefile b/Makefile index ca07d15..99ac372 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,13 @@ endif CPPFLAGS += -Wno-c++98-compat -Wno-padded +ifdef COBS_SANITIZER +ifneq (,$(findstring memory,$(COBS_SANITIZER))) +CPPFLAGS += -fsanitize-ignorelist=memory-sanitize-ignorelist.txt +LDFLAGS += -fsanitize-ignorelist=memory-sanitize-ignorelist.txt +endif +endif + $(BUILD_DIR)/cobs_unittests: $(OBJS) $(BUILD_DIR)/cobs.c.o Makefile $(CXX) $(LDFLAGS) $(COBS_SANITIZER) $(OBJS) $(BUILD_DIR)/cobs.c.o -o $@ diff --git a/memory-sanitize-ignorelist.txt b/memory-sanitize-ignorelist.txt new file mode 100644 index 0000000..e6d20e4 --- /dev/null +++ b/memory-sanitize-ignorelist.txt @@ -0,0 +1 @@ +src:*/stl_tree.h