Skip to content

fix(bb): guard component analyzer range-list mapping - #25020

Draft
AztecBot wants to merge 1 commit into
nextfrom
cb/bb-debug-range-list-bounds-20260728
Draft

fix(bb): guard component analyzer range-list mapping#25020
AztecBot wants to merge 1 commit into
nextfrom
cb/bb-debug-range-list-bounds-20260728

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

The nightly barretenberg debug build is failing in acir_components_check_tests AcirComponentsCheckTest.DetectsUnconstrainedWitnesses with _GLIBCXX_DEBUG aborting on std::vector<unsigned int>::operator[]: witness/range-list index 10 is read from a real_variable_index vector resized to 9 entries.

Root cause: the component checker deliberately simulates a missing witness mapping by shrinking builder.real_variable_index, but the circuit static analyzer and the checker range-list collection still assumed every variable index in range-list metadata could be mapped through real_variable_index. Release builds did not catch this, while the debug STL correctly aborted before the checker could return its intended UNCONSTRAINED error.

This PR:

  • routes static-analyzer constant/range-list mapping through to_real()
  • makes to_real() tolerate stale builder variable references by mapping them to zero_idx()
  • skips invalid range-list entries in ComponentsChecker so missing witnesses remain reported as unconstrained instead of crashing

CI evidence: http://ci.aztec-labs.com/32410024cc115505 from run https://github.com/AztecProtocol/barretenberg-claude/actions/runs/30333232782.

Tests

  • NATIVE_PRESET=debug AVM=0 AVM_TRANSPILER=0 cmake --build --preset debug --target acir_components_check_tests
  • NATIVE_PRESET=debug AVM=0 AVM_TRANSPILER=0 scripts/run_test.sh acir_components_check_tests AcirComponentsCheckTest.DetectsUnconstrainedWitnesses
  • ./build-debug/bin/acir_components_check_tests
  • cmake --build --preset debug --target boomerang_value_detection_tests
  • ./build-debug/bin/boomerang_value_detection_tests
  • git diff --check

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 28, 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