pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix explicit valgrind interaction in read_stream.c. 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix explicit valgrind interaction in read_stream.c. @ 2025-02-15 00:17 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Thomas Munro @ 2025-02-15 00:17 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix explicit valgrind interaction in read_stream.c. By calling wipe_mem() on per-buffer data memory that has been released, we are also telling Valgrind that the memory is "noaccess". We need to set it to "undefined" before giving it to the registered callback to fill in, when a slot is reused. As discovered by build farm animal skink when the VACUUM streamification patches landed (the first users of per-buffer data). Pushing to master only for now, to clear the error on skink. It's also possible that external code might discover the per-buffer data feature in v17, and reasonable to expect Valgrind not to produce spurious memcheck reports, but the back-patch is deferred until after the imminent minor release is out of the way. Reviewed-by: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Tested-by: Melanie Plageman <melanieplageman@gmail.com> Discussion: https://postgr.es/m/CA%2BhUKG%2Bg6aXpi2FEHqeLOzE%2BxYw%3DOV%2B-N5jhOEnnV%2BF0USM9xA%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/2a8a00674e973dec4d7d74d5e16c7d7cdedf2be5 Modified Files -------------- src/backend/storage/aio/read_stream.c | 38 +++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix explicit valgrind interaction in read_stream.c. @ 2025-02-21 02:19 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Thomas Munro @ 2025-02-21 02:19 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix explicit valgrind interaction in read_stream.c. This is a back-patch of commits 2a8a0067 and 2509b857 into REL_17_STABLE. It's doesn't fix any known live bug in PostgreSQL v17 itself, but an extension could in theory have used the per-buffer data feature and seen spurious errors under Valgrind. Discussion: https://postgr.es/m/CA%2BhUKG%2Bg6aXpi2FEHqeLOzE%2BxYw%3DOV%2B-N5jhOEnnV%2BF0USM9xA%40mail.gmail.com Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/57dca6faa9bdfd3c2ad2805fc088dc768d36fcf0 Modified Files -------------- src/backend/storage/aio/read_stream.c | 38 +++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-02-21 02:19 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-02-15 00:17 pgsql: Fix explicit valgrind interaction in read_stream.c. Thomas Munro <tmunro@postgresql.org> 2025-02-21 02:19 pgsql: Fix explicit valgrind interaction in read_stream.c. Thomas Munro <tmunro@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox