add a focused completed-board solver regression for orders 1 and 8
independently validate both returned solutions
check the next_pos() end sentinel before calling largest_square()
Commit structure
test: cover completed solver boards — old code fails under ASan with a heap-buffer-overflow
solver: check completion before probing square — minimal ordering fix
Testing
Debug CTest: 5/5 passed
Release CTest: 5/5 passed
ASan CTest: 5/5 passed
UBSan CTest: 5/5 passed
order-8 output is unchanged across the fix
Review
Independent review found no issues and reproduced both the old Debug assertion/ASan overflow and the fixed Debug/ASan suites. This also completes the feasible end-to-end independent validation prepared in #1.
## Summary
- add a focused completed-board solver regression for orders 1 and 8
- independently validate both returned solutions
- check the `next_pos()` end sentinel before calling `largest_square()`
## Commit structure
1. `test: cover completed solver boards` — old code fails under ASan with a heap-buffer-overflow
2. `solver: check completion before probing square` — minimal ordering fix
## Testing
- Debug CTest: 5/5 passed
- Release CTest: 5/5 passed
- ASan CTest: 5/5 passed
- UBSan CTest: 5/5 passed
- order-8 output is unchanged across the fix
## Review
Independent review found no issues and reproduced both the old Debug assertion/ASan overflow and the fixed Debug/ASan suites. This also completes the feasible end-to-end independent validation prepared in #1.
Closes #14
Part of #16
Exercise both the trivial order-1 solution and the feasible order-8 solution through the independent placement validator.
With the existing completion ordering, the focused test reports a heap-buffer-overflow under AddressSanitizer before validation can run.
Refs: #14
next_pos() returns the grid end sentinel when a placement completes the board. Avoid passing that sentinel to largest_square(), which requires an in-range position and otherwise reads past the grid.
Tests: Debug, Release, ASan, and UBSan CTest suites
Refs: #14
mcp
merged commit ce39d0a4d0 into main2026-07-30 16:54:09 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
next_pos()end sentinel before callinglargest_square()Commit structure
test: cover completed solver boards— old code fails under ASan with a heap-buffer-overflowsolver: check completion before probing square— minimal ordering fixTesting
Review
Independent review found no issues and reproduced both the old Debug assertion/ASan overflow and the fixed Debug/ASan suites. This also completes the feasible end-to-end independent validation prepared in #1.
Closes #14
Part of #16