Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions barretenberg/cpp/src/barretenberg/goblin/batch_merge.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,17 @@ TYPED_TEST(BatchMergeTests, TooManySubtablesFails)
GTEST_SKIP() << "This test in native setting fails due to a deserialization failure. The verifier path in the "
"same for native and recursive code, so it's enough to test the recursive code.";
} else {
#ifndef NDEBUG
// BB_DISABLE_ASSERTS lets the prover continue past the N <= max_subtables BB_ASSERT_LTE in
// BatchMergeProver::construct_proof. Once past it, compute_degree_check_polynomial reads
// degree_check_challenges[idx] for idx up to flattened_columns.size() - 1, which exceeds
// the (max_subtables + 1) * NUM_WIRES challenges allocated. In release this is silent UB
// and the verifier still rejects the malformed proof; under _GLIBCXX_DEBUG the bounds
// check on std::vector::operator[] aborts the prover before the verifier runs. The
// verifier-rejection contract here is exercised by the release build.
GTEST_SKIP() << "Skipped under _GLIBCXX_DEBUG: BB_DISABLE_ASSERTS bypasses the prover's N <= max_subtables "
"guard, and the bounds-checked vector access then aborts before the verifier can reject.";
#else
BB_DISABLE_ASSERTS();
auto op_queue = make_op_queue_with_n_subtables(TestFixture::NumSubtables + 1);
auto res = TestFixture::prove_and_verify(op_queue);
Expand All @@ -479,6 +490,7 @@ TYPED_TEST(BatchMergeTests, TooManySubtablesFails)
if constexpr (TestFixture::IsRecursive) {
EXPECT_FALSE(res.circuit_ok); // Assertions fail
}
#endif
}
}

Expand Down
Loading