Skip to content

fix: remove constexpr from functions using std::vector for _GLIBCXX_DEBUG compat#22239

Merged
johnathan79717 merged 1 commit into
merge-train/barretenbergfrom
claudebox/fix-bb-merge-train-ci
Apr 2, 2026
Merged

fix: remove constexpr from functions using std::vector for _GLIBCXX_DEBUG compat#22239
johnathan79717 merged 1 commit into
merge-train/barretenbergfrom
claudebox/fix-bb-merge-train-ci

Conversation

@AztecBot

@AztecBot AztecBot commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes ASAN and debug build failures introduced by PR #22218 which added _GLIBCXX_DEBUG to debug/ASAN build presets.

Under _GLIBCXX_DEBUG, std::vector is not a literal type (the debug wrapper lacks constexpr constructors), causing compilation errors in any constexpr function that uses std::vector.

Two functions affected:

  • affine_element::hash_to_curve() — uses std::vector<uint8_t> internally
  • ECCVMHardcodedVKAndHash::get_all() — returns std::vector<Commitment>

Neither function is ever evaluated at compile time, so removing constexpr is safe.

Test plan

  • ASAN preset (asan-fast) builds clean from scratch (1103/1103 targets, 0 failures)
  • Debug preset builds clean from scratch (1111/1111 targets, 0 failures)
  • Format check passes

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Apr 1, 2026
…EBUG compat

hash_to_curve and ECCVMHardcodedVKAndHash::get_all() use std::vector
which is not a literal type under _GLIBCXX_DEBUG (added by PR #22218).
These functions are never evaluated at compile time, so constexpr is
unnecessary.
@AztecBot AztecBot force-pushed the claudebox/fix-bb-merge-train-ci branch from a3baf90 to 867389f Compare April 1, 2026 17:18
@suyash67 suyash67 requested a review from ludamad April 2, 2026 11:02
@suyash67 suyash67 marked this pull request as ready for review April 2, 2026 11:02
@johnathan79717 johnathan79717 merged commit 0d1b322 into merge-train/barretenberg Apr 2, 2026
20 checks passed
@johnathan79717 johnathan79717 deleted the claudebox/fix-bb-merge-train-ci branch April 2, 2026 11:27
github-merge-queue Bot pushed a commit that referenced this pull request Apr 2, 2026
BEGIN_COMMIT_OVERRIDE
fix: verify accumulated pairing points in native ChonkVerifier (#22224)
chore: enable _GLIBCXX_DEBUG in debug build presets (#22218)
feat: add --memory_profile_out flag for Chonk memory profiling (#22145)
fix: disable max capacity test in debug + tiny gate separator
improvements (#22215)
fix: WASM build for memory_profile.cpp (#22231)
fix: translator audit fixes (#22242)
fix: remove constexpr from functions using std::vector for
_GLIBCXX_DEBUG compat (#22239)
fix: pippenger edge case (#22256)
fix: avoid dereferencing past-the-end vector iterators in serialize.hpp
(#22261)
chore: crypto primitives external audit response 0 (#22263)
feat: switch memory profiling from peak RSS to live heap usage (#22266)
fix: replace UB end-iterator dereference in serialize.hpp (#22262)
fix: catch exceptions in ChonkBatchVerifier::batch_check (#22270)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants