Skip to content

Commit 96386f2

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 25cd017 commit 96386f2

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
@@ -5687,6 +5687,8 @@ static int prepare_update( thread_db* tdbb,
56875687
UCHAR differences[MAX_DIFFERENCES];
56885688
if (new_rpb)
56895689
{
5690+
new_rpb->rpb_flags &= ~rpb_delta;
5691+
56905692
// If both descriptors share the same record, there cannot be any difference.
56915693
// This trick is used by VIO_writelock(), but can be a regular practice as well.
56925694
if (new_rpb->rpb_address == temp->rpb_address)

0 commit comments

Comments
 (0)