fix(bb): skip BatchMergeTests.TooManySubtablesFails under _GLIBCXX_DEBUG#23078
Closed
AztecBot wants to merge 1 commit into
Closed
fix(bb): skip BatchMergeTests.TooManySubtablesFails under _GLIBCXX_DEBUG#23078AztecBot wants to merge 1 commit into
AztecBot wants to merge 1 commit into
Conversation
Collaborator
Author
|
Automatically closing this stale claudebox draft PR (no updates for 5+ days). Re-open if still needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unblock the
Nightly Debug Buildworkflow onnext. Latest failing run: https://github.com/AztecProtocol/aztec-packages/actions/runs/25539203050 (run #80, head_shaf23aa82c52, exit 134, 8m15s).Skip
BatchMergeTests.TooManySubtablesFailsunder_GLIBCXX_DEBUG(i.e. whenNDEBUGis not defined). The verifier-rejection contract is still exercised by release builds. Same approach as the existingcommitment_key.test.cpp:DISABLED_PippengerZeroCountRegression.Root cause
TooManySubtablesFailscallsBB_DISABLE_ASSERTS()so it can drive the verifier withN = max_subtables + 1subtables. With BB asserts demoted to warnings, control flow falls past theBB_ASSERT_LTE(N, M, ...)guard at the top ofBatchMergeProver::construct_proofand reachescompute_degree_check_polynomial:With
M = 9,NUM_WIRES = 4,N = 10:flattened_columns.size() = NUM_WIRES + N * NUM_WIRES = 44degree_check_challenges.size() = (M + 1) * NUM_WIRES = 40In release this is silent UB and the verifier rejects the malformed proof. In debug, libstdc++'s
_GLIBCXX_DEBUGmakesstd::vector::operator[]bounds-checked and the OOB atidx == 40traps before the verifier runs:BB_DISABLE_ASSERTS()cannot suppress this — the bounds check is libstdc++'s, not bb's.Why the previously merged fix (#23019) is dead code on this path
#23019modifiesTweakableBatchMergeProver::construct_proof. ButBatchMergeTests::prove_and_verifyonly routes throughTweakableBatchMergeProverwhen aFaultModeis supplied;TooManySubtablesFailscallsprove_and_verify(op_queue)with no fault mode, so it goes through the baseBatchMergeProver::construct_proof(production code path) which is unchanged by#23019. Merge-train CI never exposed this because it runsci-barretenberg(release) only —ci-barretenberg-debugis nightly-only and runs onnextperbarretenberg-nightly-debug-build.yml.Verification
Reproduced and verified inside the ClaudeBox container on
nextf23aa82c52+ this fix, with the same flags as the nightly:BatchMergeTests/2.TooManySubtablesFailswith the OOB above (exit 134).TooManySubtablesFailsparameterizations), 0 failed; full suite runs in 328 s.Relationship to #23018
#23018(still open, draft) proposed the same_GLIBCXX_DEBUGskip onb30fe8f4.... This PR re-applies the same fix on top of currentnextso it can land without further rebase.#23018can be closed once this merges.Detailed analysis: https://gist.github.com/AztecBot/22747657c0f363ff0278db37024d6db1
ClaudeBox log: https://claudebox.work/s/5470e5f058610dce?run=1
ClaudeBox log: https://claudebox.work/s/5470e5f058610dce?run=1