From df193ae846b5f0e8e696a556553b50e976456a0f Mon Sep 17 00:00:00 2001 From: Daniel McCoy Stephenson Date: Sun, 23 Aug 2026 01:34:59 -0600 Subject: [PATCH] Re-enable leak detection in the AddressSanitizer test script The suppression was added for a leak in the throw-by-pointer exception pattern, which no longer exists: every throw site now constructs the exception by value, and the library's only heap allocation (Environment::grid) is paired with a delete in ~Environment. Closes #33 Co-Authored-By: Claude Opus 5 (1M context) --- run_tests_asan.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/run_tests_asan.sh b/run_tests_asan.sh index ae5ad18..84fa624 100644 --- a/run_tests_asan.sh +++ b/run_tests_asan.sh @@ -4,6 +4,5 @@ rm ./tests_executable_asan # compile with AddressSanitizer to catch memory-safety regressions (e.g. new/free mismatches, use-after-free) g++ -fsanitize=address -g src/*.cpp -o tests_executable_asan -# run executable (leak detection is off: a pre-existing, separately tracked leak -# in the throw-by-pointer exception pattern would otherwise fail every run) -ASAN_OPTIONS=detect_leaks=0 ./tests_executable_asan +# run executable (leak detection is on, so an unfreed allocation fails the run) +ASAN_OPTIONS=detect_leaks=1 ./tests_executable_asan