Skip to content

fix: pass barretenberg debug checks#24708

Draft
AztecBot wants to merge 1 commit into
nextfrom
cb/bb-debug-build-fix
Draft

fix: pass barretenberg debug checks#24708
AztecBot wants to merge 1 commit into
nextfrom
cb/bb-debug-build-fix

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

  • keep the unconstrained-witness ACIR test from corrupting the builder's witness map while still removing the synthesized arithmetic gate it wants to test
  • ignore stale range-list variable indices instead of letting debug STL bounds checks abort diagnostics
  • preserve optional CHECK_CIRCUIT_STACKTRACES data across execution-trace block copies/moves and make missing trace printing a no-op

Root Cause

The debug build exposed two diagnostic-path issues. AcirComponentsCheckTest.DetectsUnconstrainedWitnesses simulated an unconstrained witness by shrinking builder.real_variable_index, leaving existing range-list entries pointing past the end of the vector; libstdc++ debug checks aborted before the components checker could report the intended error.

After that was fixed, ChonkTests.AppPairingInputsTamperingFailure hit a second debug-only path: circuit-checker diagnostics copied execution trace blocks without copying their optional stack traces, then tried to print a row's missing stack trace and threw std::out_of_range.

Verification

  • cmake --build barretenberg/cpp/build-debug --target acir_components_check_tests chonk_tests
  • barretenberg/cpp/build-debug/bin/acir_components_check_tests
  • barretenberg/cpp/build-debug/bin/chonk_tests --gtest_filter=ChonkTests.AppPairingInputsTamperingFailure
  • barretenberg/cpp/build-debug/bin/chonk_tests --gtest_filter='ChonkTests.AppPairingInputsTamperingFailure:All/KernelIOTamperingTests.CausesVerificationFailure/*'
  • NATIVE_PRESET=debug AVM=0 AVM_TRANSPILER=0 ./barretenberg/cpp/bootstrap.sh build_native
  • NATIVE_PRESET=debug AVM=0 AVM_TRANSPILER=0 ./barretenberg/cpp/bootstrap.sh test (6,987 tests in 1,292s)

Created by claudebox · group: slackbot

@AztecBot AztecBot added ci-barretenberg Run all barretenberg/cpp checks. ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR. labels Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-barretenberg Run all barretenberg/cpp checks. ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant