Possible uninitialized use of the variables (src/backend/access/transam/twophase.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Possible uninitialized use of the variables (src/backend/access/transam/twophase.c)
Date
Msg-id CAEudQAooECJ+gU_RZB-yhioPOV94R4ucoHAf68PiJhLpgpVpBw@mail.gmail.com
Whole thread Raw
Responses Re: Possible uninitialized use of the variables (src/backend/access/transam/twophase.c)  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
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


Attachment

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: [PATCH] Improve function toast_delete_external (src/backend/access/table/toast_helper.c)
Next
From: Peter Eisentraut
Date:
Subject: Re: Database-level collation version tracking