From 0bfe244a2d9b29b827fe119d9654999cf89dda6b Mon Sep 17 00:00:00 2001 From: Quinn Date: Mon, 17 Feb 2025 18:31:08 +0100 Subject: [PATCH] try to fix sanitisers --- .vscode/launch.json | 2 ++ makefile | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 2a2f8d8..29bf5e5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,6 +7,8 @@ "request": "launch", "env": { "DEBUG": "1", + "ASAN_OPTIONS": "detect_leaks=0", + "UBSAN_OPTIONS": "print_stacktrace=1:halt_on_error=1", }, "program": "", "linux": { diff --git a/makefile b/makefile index 4f2025c..3ef6455 100644 --- a/makefile +++ b/makefile @@ -8,7 +8,7 @@ CFLAGS := $(shell pkg-config --cflags sdl2) -Wall -Wextra -Wpedantic -Wno-pointe LDFLAGS := $(shell pkg-config --libs sdl2) -lm ifeq ($(DEBUG),1) -CFLAGS += -DDEBUG -Og -g -fsanitize=address,undefined,leak,integer +CFLAGS += -DDEBUG -fsanitize=address,undefined,integer -g -Og else REL_FLAGS += -O3 endif @@ -46,7 +46,7 @@ _build: compile_commands.json $(DIR) $(TARGET) $(ASSETS) clean: rm -rf $(DIR_BIN) $(DIR_OBJ) compile_commands.json -# create the binary +# create the binary (linking step) $(TARGET): $(OBJ) @$(call wr_colour,"using arguments: $(CFLAGS) $(LDFLAGS)",94) @$(CC) -o $(TARGET) $^ $(CFLAGS) $(LDFLAGS)