Skip to content

Commit cdd1207

Browse files
committed
Fix #8799: BUGCHECK "decompression overran buffer (179)" when WITH LOCK clause is used (#8803)
VIO_writelock creates new_rpb by copying from org_rpb which has rpb_delta flag set. new_rpb is passed to prepare_update. It creates a delta but its size exceeds the limit (1024) so the current version is stored as a regular record. The problem is that rpb_delta flag remains set for new_rpb, and then replace_record sets it in the header of the primary version. From this moment any attempt to get data of older versions fails.
1 parent c6d4331 commit cdd1207

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/jrd/vio.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5640,6 +5640,8 @@ static int prepare_update( thread_db* tdbb,
56405640
UCHAR differences[MAX_DIFFERENCES];
56415641
if (new_rpb)
56425642
{
5643+
new_rpb->rpb_flags &= ~rpb_delta;
5644+
56435645
// If both descriptors share the same record, there cannot be any difference.
56445646
// This trick is used by VIO_writelock(), but can be a regular practice as well.
56455647
if (new_rpb->rpb_address == temp->rpb_address)

0 commit comments

Comments
 (0)