pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid memcpy() with a NULL source pointer and count == 0 4+ messages / 1 participants [nested] [flat]
* pgsql: Avoid memcpy() with a NULL source pointer and count == 0 @ 2020-12-01 14:47 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2020-12-01 14:47 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid memcpy() with a NULL source pointer and count == 0 When memcpy() is called on a pointer, the compiler is entitled to assume that the pointer is not null, which can lead to optimizing nearby code in potentially undesirable ways. We still want such optimizations (gcc's -fdelete-null-pointer-checks) in cases where they're valid. Related: commit 13bba02271dc. Backpatch to pg11, where this particular instance appeared. Reported-by: Ranier Vilela <ranier.vf@gmail.com> Reported-by: Zhihong Yu <zyu@yugabyte.com> Discussion: https://postgr.es/m/CAEudQApUndmQkr5fLrCKXQ7+ib44i7S+Kk93pyVThS85PnG3bQ@mail.gmail.com Discussion: https://postgr.es/m/CALNJ-vSdhwSM5f4tnNn1cdLHvXMVe_S+V3nR5GwNrmCPNB2VtQ@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/677f74e5bb8360122ebf2f473d7169ed65ce4dba Modified Files -------------- src/backend/commands/indexcmds.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Avoid memcpy() with a NULL source pointer and count == 0 @ 2020-12-01 14:47 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2020-12-01 14:47 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid memcpy() with a NULL source pointer and count == 0 When memcpy() is called on a pointer, the compiler is entitled to assume that the pointer is not null, which can lead to optimizing nearby code in potentially undesirable ways. We still want such optimizations (gcc's -fdelete-null-pointer-checks) in cases where they're valid. Related: commit 13bba02271dc. Backpatch to pg11, where this particular instance appeared. Reported-by: Ranier Vilela <ranier.vf@gmail.com> Reported-by: Zhihong Yu <zyu@yugabyte.com> Discussion: https://postgr.es/m/CAEudQApUndmQkr5fLrCKXQ7+ib44i7S+Kk93pyVThS85PnG3bQ@mail.gmail.com Discussion: https://postgr.es/m/CALNJ-vSdhwSM5f4tnNn1cdLHvXMVe_S+V3nR5GwNrmCPNB2VtQ@mail.gmail.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5a1d1b9540a4f5bf4ee6761a17b21ad7c0012b49 Modified Files -------------- src/backend/commands/indexcmds.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Avoid memcpy() with a NULL source pointer and count == 0 @ 2020-12-01 14:47 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2020-12-01 14:47 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid memcpy() with a NULL source pointer and count == 0 When memcpy() is called on a pointer, the compiler is entitled to assume that the pointer is not null, which can lead to optimizing nearby code in potentially undesirable ways. We still want such optimizations (gcc's -fdelete-null-pointer-checks) in cases where they're valid. Related: commit 13bba02271dc. Backpatch to pg11, where this particular instance appeared. Reported-by: Ranier Vilela <ranier.vf@gmail.com> Reported-by: Zhihong Yu <zyu@yugabyte.com> Discussion: https://postgr.es/m/CAEudQApUndmQkr5fLrCKXQ7+ib44i7S+Kk93pyVThS85PnG3bQ@mail.gmail.com Discussion: https://postgr.es/m/CALNJ-vSdhwSM5f4tnNn1cdLHvXMVe_S+V3nR5GwNrmCPNB2VtQ@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f0ff52f25cb9773de67303a77e6afe3b8a2c4d48 Modified Files -------------- src/backend/commands/indexcmds.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Avoid memcpy() with a NULL source pointer and count == 0 @ 2020-12-01 14:47 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2020-12-01 14:47 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid memcpy() with a NULL source pointer and count == 0 When memcpy() is called on a pointer, the compiler is entitled to assume that the pointer is not null, which can lead to optimizing nearby code in potentially undesirable ways. We still want such optimizations (gcc's -fdelete-null-pointer-checks) in cases where they're valid. Related: commit 13bba02271dc. Backpatch to pg11, where this particular instance appeared. Reported-by: Ranier Vilela <ranier.vf@gmail.com> Reported-by: Zhihong Yu <zyu@yugabyte.com> Discussion: https://postgr.es/m/CAEudQApUndmQkr5fLrCKXQ7+ib44i7S+Kk93pyVThS85PnG3bQ@mail.gmail.com Discussion: https://postgr.es/m/CALNJ-vSdhwSM5f4tnNn1cdLHvXMVe_S+V3nR5GwNrmCPNB2VtQ@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/49aaabdf8d0b85cbf19537bb8bc12856f2e9dc4d Modified Files -------------- src/backend/commands/indexcmds.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-12-01 14:47 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-12-01 14:47 pgsql: Avoid memcpy() with a NULL source pointer and count == 0 Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-12-01 14:47 pgsql: Avoid memcpy() with a NULL source pointer and count == 0 Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-12-01 14:47 pgsql: Avoid memcpy() with a NULL source pointer and count == 0 Alvaro Herrera <alvherre@alvh.no-ip.org> 2020-12-01 14:47 pgsql: Avoid memcpy() with a NULL source pointer and count == 0 Alvaro Herrera <alvherre@alvh.no-ip.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