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

Commit2a2e1b4

Browse files
committed
bufmgr: Fix signedness of mask variable in BufferSync()
BM_PERMANENT is defined as 1U<<31, which is a negative number when interpretedas a signed integer. Unfortunately the mask variable in BufferSync() wassigned. This has been wrong for a long time, but failed to fail, due tointeger conversion rules.However, in an upcoming patch the width of the state variable will beincreased, with the wrong signedness leading to never flushing permanentbuffers - luckily caught in a test.It seems better to fix this separately, instead of doing so as part of alarge, otherwise mechanical, patch.Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>Discussion:https://postgr.es/m/fvfmkr5kk4nyex56ejgxj3uzi63isfxovp2biecb4bspbjrze7@az2pljabhnff
1 parent3c2b97b commit2a2e1b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/storage/buffer/bufmgr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3321,7 +3321,7 @@ BufferSync(int flags)
33213321
Oidlast_tsid;
33223322
binaryheap*ts_heap;
33233323
inti;
3324-
intmask=BM_DIRTY;
3324+
uint32mask=BM_DIRTY;
33253325
WritebackContextwb_context;
33263326

33273327
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp