Possible uninitialized use of the variables (src/backend/access/transam/twophase.c)
Ranier Vilela <ranier.vf@gmail.com>
From: Ranier Vilela <ranier.vf@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2022-02-09T11:15:45Z
Lists: pgsql-hackers
Attachments
- v1_possible_unitialized_variables_twophase.patch (application/octet-stream) patch v1
Hi, Commit https://github.com/postgres/postgres/commit/1eb6d6527aae264b3e0b9c95aa70bb7a594ad1cf, modified data struct TwoPhaseFileHeader and added two new fields: XLogRecPtr origin_lsn; /* lsn of this record at origin node */ TimestampTz origin_timestamp; /* time of prepare at origin node */ I think thay forgot initialize these fields in the function StartPrepare because, when calling function save_state_data(&hdr, sizeof(TwoPhaseFileHeader)); I have one report about possible uninitialized usage of the variables. Best regards, Ranier Vilela
Commits
-
Make origin data initialization consistent other fields in 2PC header
- c963e84fb8c8 15.0 landed
-
Store 2PC GID in commit/abort WAL recs for logical decoding
- 1eb6d6527aae 11.0 cited