Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7ba6ee8

Browse files
committed
Add missed bms_copy() in perform_pruning_combine_step
We were initializing a BMS to merely reference an existing one, whichwould cause a double-free (and a crash) when the recursive algorithmtried to intersect it with an empty one. Fix it by creating a copy atinitialization time.Reported-by: sqlsmith (by way of Andreas Seltenreich)Author: Amit LangoteDiscussion:https://postgr.es/m/87in923lyw.fsf@ansel.ydns.eu
1 parent2c19ea8 commit7ba6ee8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/partitioning/partprune.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2923,7 +2923,8 @@ perform_pruning_combine_step(PartitionPruneContext *context,
29232923
if (firststep)
29242924
{
29252925
/* Copy step's result the first time. */
2926-
result->bound_offsets=step_result->bound_offsets;
2926+
result->bound_offsets=
2927+
bms_copy(step_result->bound_offsets);
29272928
result->scan_null=step_result->scan_null;
29282929
result->scan_default=step_result->scan_default;
29292930
firststep= false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp