Skip to content

Commit

Permalink
Fix missing result assignment for bms_del_member
Browse files Browse the repository at this point in the history
This was causing memory corruption in the PG16 tests but affects
previous PG versions as well.
  • Loading branch information
svenklemm committed Nov 3, 2023
1 parent 22b556d commit 4ed4e46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .unreleased/pr_6264
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes: #6264 Fix missing bms_del_member result assignment
3 changes: 2 additions & 1 deletion tsl/src/nodes/decompress_chunk/batch_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ batch_array_get_free_slot(DecompressChunkState *chunk_state)
Assert(next_free_batch < chunk_state->n_batch_states);
Assert(TupIsNull(batch_array_get_at(chunk_state, next_free_batch)->decompressed_scan_slot));

bms_del_member(chunk_state->unused_batch_states, next_free_batch);
chunk_state->unused_batch_states =
bms_del_member(chunk_state->unused_batch_states, next_free_batch);

return next_free_batch;
}

0 comments on commit 4ed4e46

Please sign in to comment.