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

Commitb19890d

Browse files
committed
Silence Valgrind complaint with EXEC_BACKEND
The padding bytes written to the backend params file wereuninitialized. That's harmless because we don't access the paddingbytes when we read the file back in, but Valgrind doesn't knowthat. In any case, clear the padding bytes to make Valgrind happy.Reported-by: Alexander LakhinDiscussion:https://www.postgresql.org/message-id/014768ed-8b39-c44f-b07c-098c87b1644c@gmail.com
1 parent0d93ce3 commitb19890d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4490,6 +4490,14 @@ internal_forkexec(int argc, char *argv[], Port *port)
44904490
BackendParametersparam;
44914491
FILE*fp;
44924492

4493+
/*
4494+
* Make sure padding bytes are initialized, to prevent Valgrind from
4495+
* complaining about writing uninitialized bytes to the file. This isn't
4496+
* performance critical, and the win32 implementation initializes the
4497+
* padding bytes to zeros, so do it even when not using Valgrind.
4498+
*/
4499+
memset(&param,0,sizeof(BackendParameters));
4500+
44934501
if (!save_backend_variables(&param,port))
44944502
return-1;/* log made by save_backend_variables */
44954503

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp