Skip to content

test(ratchet): multistate memory-safety stress guard (ASan)#274

Open
ms609 wants to merge 2 commits into
cpp-searchfrom
claude/asan-ratchet-multistate-oob
Open

test(ratchet): multistate memory-safety stress guard (ASan)#274
ms609 wants to merge 2 commits into
cpp-searchfrom
claude/asan-ratchet-multistate-oob

Conversation

@ms609

@ms609 ms609 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Adds a ratchet memory-safety stress guard: repeated ts_ratchet_search calls in one process on a 30-tip x 25-char 3-state matrix (ZERO_ONLY/EW and UPWEIGHT_ONLY/IW). Not skip_extended, so gcc-ASAN exercises it.

Origin: a 2026-07-16 exit-139 heap-corruption report in this path. Could NOT reproduce on any clean build: Linux gcc-ASAN clean (both configs); fresh local Windows -O2 build ran 500 iterations no crash; ratchet kernels byte-identical to reported commit d9ce8dca; emutls class ruled out (serial, no threads); no struct-layout header change in the lever-6 batch to straddle. Most consistent with a stale-object / mixed-ABI incremental build, not a committed-source defect.

Test is expected to PASS; a future failure should prompt a clean rebuild (rm src/*.o; --preclean) before being treated as a source regression. gcc-ASAN is disabled again, so this PR does not auto-run it.

Generated with Claude Code

ms609 and others added 2 commits July 16, 2026 07:56
Faithful reproduction of the ratchet-multistate-segfault bug: 30x25
3-state EW (ZERO_ONLY) and IW (UPWEIGHT_ONLY) configs, 30 repeated
ts_ratchet_search calls per config in one process. Not skip_extended()
so the gcc-ASAN workflow runs it and halts on the first OOB access.

Diagnostic branch; expected to abort under ASan until the OOB is fixed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…uard

Investigation of the 2026-07-16 exit-139 report (ratchet-multistate-
segfault) could not reproduce it on any clean build: Linux gcc-ASAN clean
(both configs), and a fresh local Windows -O2 build ran 500 iterations
without a crash, with search kernels byte-identical to the reported commit.
Most consistent with a stale-object / mixed-ABI incremental build, not a
source defect. Keep the test as a guard against a future genuine OOB.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant