make sanitize runs the whole suite, not half of it

It built all three tools with the sanitizers and then ran run.sh and
terminal.sh only. So SplitDisk was compiled sanitized and never once
exercised, and native.sh - which drives the assembler and the emulator
harder than anything else here, through two self-hosting builds and a fixed
point - was skipped entirely.

Those are precisely the places worth watching: block and tail arithmetic on
disk images, and buffer indexing in two assemblers, one of which was written
this week.

disk.sh, native.sh and docs.sh now run under the sanitizers with the rest.
Timed first rather than guessed at: 0.41s, 6.05s and 0.14s, against a whole
sanitize run of 33 seconds. All three pass, which is worth knowing given
none of them had ever been run this way.

The README said sanitize ran "the suite", which was generous. Now it does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-08-21 16:51:03 -04:00
co-authored by Claude Opus 5
parent 8ace20629b
commit 9690ecf21f
3 changed files with 14 additions and 1 deletions
+13
View File
@@ -109,6 +109,13 @@ test: $(EMU_TARGET) $(ASM_TARGET) $(DSK_TARGET) strict
# the test suite under them. Slower than 'make test', and worth running before a
# release or after anything that touches memory handling.
#
# THE WHOLE SUITE, which it did not used to be: it built all three tools sanitized and
# then ran only run.sh and terminal.sh, so SplitDisk was compiled with the sanitizers and
# never exercised, and native.sh - which drives the assembler and the emulator harder than
# anything else here - was skipped. Those are the parts where block arithmetic on disk
# images and buffer indexing in two assemblers live, which is exactly what the sanitizers
# are for. Adding the three of them costs about six seconds.
#
# The sanitizers catch reads and writes off the end of an array, use after free,
# leaks, and undefined arithmetic. They also fill fresh allocations with a junk
# pattern, which is what turns a read of uninitialised memory from something that
@@ -124,7 +131,13 @@ sanitize:
@echo "Running the test suite under AddressSanitizer and UndefinedBehaviorSanitizer."
@./Tests/run.sh
@echo
@./Tests/disk.sh
@echo
@./Tests/terminal.sh
@echo
@./Tests/native.sh
@echo
@./Tests/docs.sh
@$(MAKE) --no-print-directory clean
@$(MAKE) --no-print-directory
@echo "Sanitizer run finished cleanly. Normal binaries rebuilt."