Skip to content

test: fix acir components debug fixture - #24986

Draft
AztecBot wants to merge 1 commit into
nextfrom
cb/fix-acir-components-debug-fixture
Draft

test: fix acir components debug fixture#24986
AztecBot wants to merge 1 commit into
nextfrom
cb/fix-acir-components-debug-fixture

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes the nightly debug failure in AcirComponentsCheckTest.DetectsUnconstrainedWitnesses.
  • Replaces the test's direct builder.real_variable_index.resize(9) mutation with a valid smaller synthesized circuit checked against a larger ACIR circuit.
  • Keeps coverage of the UNCONSTRAINED error path without breaking the static analyzer's builder invariants under _GLIBCXX_DEBUG.

Root Cause

The failing test simulated a missing circuit witness by shrinking builder.real_variable_index after create_circuit. The builder's gates still referenced the original witness indices, so libstdc++ debug mode aborted inside the static analyzer while converting gate variables through real_variable_index[10] on a vector of size 9. Release builds did not catch that out-of-bounds access.

Testing

  • cmake --preset debug
  • cmake --build build-debug --target acir_components_check_tests
  • NATIVE_PRESET=debug barretenberg/cpp/scripts/run_test.sh acir_components_check_tests AcirComponentsCheckTest.DetectsUnconstrainedWitnesses
  • NATIVE_PRESET=debug barretenberg/cpp/scripts/run_test.sh acir_components_check_tests '*'

Created by claudebox · group: slackbot · Slack thread

@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 26, 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