pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Use the correct sizeof() in BufFileLoadBuffer 6+ messages / 1 participants [nested] [flat]
* pgsql: Use the correct sizeof() in BufFileLoadBuffer @ 2025-01-25 01:17 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Tomas Vondra @ 2025-01-25 01:17 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use the correct sizeof() in BufFileLoadBuffer The sizeof() call should reference buffer.data, because that's the buffer we're reading data into, not the whole PGAlignedBuffer union. This was introduced by 44cac93464, which replaced the simple buffer with a PGAlignedBuffer field. It's benign, because the buffer is the largest field of the union, so the sizes are the same. But it's easy to trip over this in a patch, so fix and backpatch. Commit 44cac93464 went into 12, but that's EOL. Backpatch-through: 13 Discussion: https://postgr.es/m/928bdab1-6567-449f-98c4-339cd2203b87@vondra.me Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/38273b5f831bc7651fc479eacf3644e96a551af8 Modified Files -------------- src/backend/storage/file/buffile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Use the correct sizeof() in BufFileLoadBuffer @ 2025-01-25 01:17 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Tomas Vondra @ 2025-01-25 01:17 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use the correct sizeof() in BufFileLoadBuffer The sizeof() call should reference buffer.data, because that's the buffer we're reading data into, not the whole PGAlignedBuffer union. This was introduced by 44cac93464, which replaced the simple buffer with a PGAlignedBuffer field. It's benign, because the buffer is the largest field of the union, so the sizes are the same. But it's easy to trip over this in a patch, so fix and backpatch. Commit 44cac93464 went into 12, but that's EOL. Backpatch-through: 13 Discussion: https://postgr.es/m/928bdab1-6567-449f-98c4-339cd2203b87@vondra.me Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/50cd651254354397ca2f2b795dd6aac300826076 Modified Files -------------- src/backend/storage/file/buffile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Use the correct sizeof() in BufFileLoadBuffer @ 2025-01-25 01:17 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Tomas Vondra @ 2025-01-25 01:17 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use the correct sizeof() in BufFileLoadBuffer The sizeof() call should reference buffer.data, because that's the buffer we're reading data into, not the whole PGAlignedBuffer union. This was introduced by 44cac93464, which replaced the simple buffer with a PGAlignedBuffer field. It's benign, because the buffer is the largest field of the union, so the sizes are the same. But it's easy to trip over this in a patch, so fix and backpatch. Commit 44cac93464 went into 12, but that's EOL. Backpatch-through: 13 Discussion: https://postgr.es/m/928bdab1-6567-449f-98c4-339cd2203b87@vondra.me Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/92598f4fa58da45226b3414d6d880cf4622481a7 Modified Files -------------- src/backend/storage/file/buffile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Use the correct sizeof() in BufFileLoadBuffer @ 2025-01-25 01:17 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Tomas Vondra @ 2025-01-25 01:17 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use the correct sizeof() in BufFileLoadBuffer The sizeof() call should reference buffer.data, because that's the buffer we're reading data into, not the whole PGAlignedBuffer union. This was introduced by 44cac93464, which replaced the simple buffer with a PGAlignedBuffer field. It's benign, because the buffer is the largest field of the union, so the sizes are the same. But it's easy to trip over this in a patch, so fix and backpatch. Commit 44cac93464 went into 12, but that's EOL. Backpatch-through: 13 Discussion: https://postgr.es/m/928bdab1-6567-449f-98c4-339cd2203b87@vondra.me Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8cedf6a1b9fcbd33f97413b6a37b38d936522624 Modified Files -------------- src/backend/storage/file/buffile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Use the correct sizeof() in BufFileLoadBuffer @ 2025-01-25 01:17 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Tomas Vondra @ 2025-01-25 01:17 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use the correct sizeof() in BufFileLoadBuffer The sizeof() call should reference buffer.data, because that's the buffer we're reading data into, not the whole PGAlignedBuffer union. This was introduced by 44cac93464, which replaced the simple buffer with a PGAlignedBuffer field. It's benign, because the buffer is the largest field of the union, so the sizes are the same. But it's easy to trip over this in a patch, so fix and backpatch. Commit 44cac93464 went into 12, but that's EOL. Backpatch-through: 13 Discussion: https://postgr.es/m/928bdab1-6567-449f-98c4-339cd2203b87@vondra.me Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fb60050f42019b1dc5781fa0f43ca0fa7f0de9c7 Modified Files -------------- src/backend/storage/file/buffile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Use the correct sizeof() in BufFileLoadBuffer @ 2025-01-25 01:18 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Tomas Vondra @ 2025-01-25 01:18 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Use the correct sizeof() in BufFileLoadBuffer The sizeof() call should reference buffer.data, because that's the buffer we're reading data into, not the whole PGAlignedBuffer union. This was introduced by 44cac93464, which replaced the simple buffer with a PGAlignedBuffer field. It's benign, because the buffer is the largest field of the union, so the sizes are the same. But it's easy to trip over this in a patch, so fix and backpatch. Commit 44cac93464 went into 12, but that's EOL. Backpatch-through: 13 Discussion: https://postgr.es/m/928bdab1-6567-449f-98c4-339cd2203b87@vondra.me Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/88d322a160e3e648406ffa692b0988c1b0fe2db8 Modified Files -------------- src/backend/storage/file/buffile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2025-01-25 01:18 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-01-25 01:17 pgsql: Use the correct sizeof() in BufFileLoadBuffer Tomas Vondra <tomas.vondra@postgresql.org> 2025-01-25 01:17 pgsql: Use the correct sizeof() in BufFileLoadBuffer Tomas Vondra <tomas.vondra@postgresql.org> 2025-01-25 01:17 pgsql: Use the correct sizeof() in BufFileLoadBuffer Tomas Vondra <tomas.vondra@postgresql.org> 2025-01-25 01:17 pgsql: Use the correct sizeof() in BufFileLoadBuffer Tomas Vondra <tomas.vondra@postgresql.org> 2025-01-25 01:17 pgsql: Use the correct sizeof() in BufFileLoadBuffer Tomas Vondra <tomas.vondra@postgresql.org> 2025-01-25 01:18 pgsql: Use the correct sizeof() in BufFileLoadBuffer Tomas Vondra <tomas.vondra@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