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

Commit6fd144e

Browse files
Fix integer underflow in shared memory debugging
dsa_dump would print a large negative number instead of zero forsegment bin 0. Fix by explicitly checking for underflow and addspecial case for bin 0. Backpatch to all supported versions.Author: Ian Ilyasov <ianilyasov@outlook.com>Reviewed-by: Robert Haas <robertmhaas@gmail.com>Discussion:https://postgr.es/m/GV1P251MB1004E0D09D117D3CECF9256ECD502@GV1P251MB1004.EURP251.PROD.OUTLOOK.COMBackpatch-through: v12
1 parentb3f6b14 commit6fd144e

File tree

1 file changed

+7
-3
lines changed
  • src/backend/utils/mmgr

1 file changed

+7
-3
lines changed

‎src/backend/utils/mmgr/dsa.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,13 @@ dsa_dump(dsa_area *area)
11131113
{
11141114
dsa_segment_indexsegment_index;
11151115

1116-
fprintf(stderr,
1117-
" segment bin %zu (at least %d contiguous pages free):\n",
1118-
i,1 << (i-1));
1116+
if (i==0)
1117+
fprintf(stderr,
1118+
" segment bin %zu (no contiguous free pages):\n",i);
1119+
else
1120+
fprintf(stderr,
1121+
" segment bin %zu (at least %d contiguous pages free):\n",
1122+
i,1 << (i-1));
11191123
segment_index=area->control->segment_bins[i];
11201124
while (segment_index!=DSA_SEGMENT_INDEX_NONE)
11211125
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp