Make the memory check a gate

It was reporting and shrugging. A definite leak, a read past the end of an
allocation or a branch on uninitialised memory now fails the build on the
push that introduces it, which is the only point at which it is cheap to
fix.

The six findings the job had on its first run were fixed rather than
excused, so the gate closes on a clean tree instead of on a backlog.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Andrew Kesterson <andrew@aklabs.net>
This commit is contained in:
2026-07-31 15:49:22 -04:00
parent 74cc4567ee
commit 7dc8ad08b8
2 changed files with 6 additions and 7 deletions

View File

@@ -132,14 +132,13 @@ jobs:
# suites scale themselves down when they detect valgrind, which turns them # suites scale themselves down when they detect valgrind, which turns them
# into the broadest path coverage in the tree at a cost this job can afford. # into the broadest path coverage in the tree at a cost this job can afford.
# #
# continue-on-error until TODO.md "Memory checking" items 34-39 are closed. # This job gates. A definite leak, a read past the end of an allocation, or a
# The findings are real and they are all in libakgl, so this job is red today # branch on uninitialised memory fails the build on the push that introduced
# by telling the truth; gating on it now would only teach everyone to ignore a # it -- not on the day somebody gets around to caring. The six findings this
# red build. Remove the flag with the commit that closes the last item -- and # job had on its first run were fixed to make that possible rather than
# the JSON one (item 34) is four lines, so that should not be a long wait. # excused into a warning.
memory_check: memory_check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
continue-on-error: true
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@@ -88,7 +88,7 @@ because the others cannot do its work:
|---|---|---| |---|---|---|
| `cmake_build` | Debug + `AKGL_COVERAGE=ON` | The unit suites and the coverage report. The perf suites run here too, at `AKGL_BENCH_SCALE=0.02`, for path coverage only — a timing taken under gcov is a measurement of gcov. | | `cmake_build` | Debug + `AKGL_COVERAGE=ON` | The unit suites and the coverage report. The perf suites run here too, at `AKGL_BENCH_SCALE=0.02`, for path coverage only — a timing taken under gcov is a measurement of gcov. |
| `performance` | RelWithDebInfo | `ctest -L perf`. The only job where budgets are enforced, because `tests/benchutil.h` enforces them only when compiled optimized at full scale. Keeps the tables as an artifact. | | `performance` | RelWithDebInfo | `ctest -L perf`. The only job where budgets are enforced, because `tests/benchutil.h` enforces them only when compiled optimized at full scale. Keeps the tables as an artifact. |
| `memory_check` | RelWithDebInfo | `scripts/memcheck.sh`, every suite under valgrind. `continue-on-error` until TODO.md "Memory checking" items 34-39 are closed; keeps the valgrind logs as an artifact. | | `memory_check` | RelWithDebInfo | `scripts/memcheck.sh`, every suite under valgrind. Gates: a definite leak, an invalid access or a branch on uninitialised memory fails the build. Keeps the valgrind logs as an artifact. |
| `mutation_test` | Debug | One focused source file, so CI stays bounded. | | `mutation_test` | Debug | One focused source file, so CI stays bounded. |
The `character` suite is excluded wherever a whole run is selected: it fails The `character` suite is excluded wherever a whole run is selected: it fails