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:
co-authored by
Claude Opus 5
parent
8ace20629b
commit
9690ecf21f
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
@@ -182,7 +182,7 @@ To rebuild all three tools with the address and undefined behaviour sanitizers a
|
|||||||
make sanitize
|
make sanitize
|
||||||
```
|
```
|
||||||
|
|
||||||
This catches reads and writes past the end of an array, use after free, leaks, and undefined arithmetic. It also fills fresh allocations with a junk pattern, which turns a read of uninitialised memory from something that quietly works into something the tests notice. It takes about twice as long as `make test`, and puts the ordinary binaries back when it finishes.
|
This catches reads and writes past the end of an array, use after free, leaks, and undefined arithmetic. It also fills fresh allocations with a junk pattern, which turns a read of uninitialised memory from something that quietly works into something the tests notice. It runs everything `make test` runs, takes about twice as long, and puts the ordinary binaries back when it finishes.
|
||||||
|
|
||||||
## Documentation:
|
## Documentation:
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
# the test suite under them. Slower than 'make test', and worth running before a
|
||||||
# release or after anything that touches memory handling.
|
# 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,
|
# 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
|
# 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
|
# 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."
|
@echo "Running the test suite under AddressSanitizer and UndefinedBehaviorSanitizer."
|
||||||
@./Tests/run.sh
|
@./Tests/run.sh
|
||||||
@echo
|
@echo
|
||||||
|
@./Tests/disk.sh
|
||||||
|
@echo
|
||||||
@./Tests/terminal.sh
|
@./Tests/terminal.sh
|
||||||
|
@echo
|
||||||
|
@./Tests/native.sh
|
||||||
|
@echo
|
||||||
|
@./Tests/docs.sh
|
||||||
@$(MAKE) --no-print-directory clean
|
@$(MAKE) --no-print-directory clean
|
||||||
@$(MAKE) --no-print-directory
|
@$(MAKE) --no-print-directory
|
||||||
@echo "Sanitizer run finished cleanly. Normal binaries rebuilt."
|
@echo "Sanitizer run finished cleanly. Normal binaries rebuilt."
|
||||||
|
|||||||
Reference in New Issue
Block a user