We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a684e5a commit e1b1232Copy full SHA for e1b1232
1 file changed
Framework/Core/include/Framework/AnalysisHelpers.h
@@ -514,6 +514,14 @@ struct WritingCursor {
514
requires(sizeof...(Ts) == framework::pack_size(typename persistent_table_t::persistent_columns_t{}))
515
{
516
++mCount;
517
+ if (mReserved >= 0 && mCount >= mReserved) [[unlikely]] {
518
+ // reserve() switched this cursor to UnsafeAppend, which does not grow its
519
+ // buffers. Writing row mCount (>= the reserved count) would overrun them and
520
+ // silently corrupt the heap, so fail here, naming the offending table and
521
+ // row, rather than crashing later somewhere unrelated.
522
+ LOG(fatal) << "Table '" << outputSpec.binding.value << "': writing row " << mCount
523
+ << " exceeds reserve(" << mReserved << ").";
524
+ }
525
cursor(0, extract(args)...);
526
}
527
0 commit comments