Re: Clang UndefinedBehaviorSanitize (Postgres14) Detected undefined-behavior
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Ranier Vilela <ranier.vf@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-08-28T02:42:08Z
Lists: pgsql-hackers
On Thu, Aug 27, 2020 at 12:57:20PM -0400, Alvaro Herrera wrote: > On 2020-Aug-27, Ranier Vilela wrote: > > indexcmds.c (1162): > > memcpy(part_oids, partdesc->oids, sizeof(Oid) * nparts); > > Looks legit, and at least per commit 13bba02271dc we do fix such things, > even if it's useless in practice. > > Given that no buildfarm member has ever complained, this exercise seems > pretty pointless. Later decision to stop changing such code: https://postgr.es/m/flat/e1a26ece-7057-a234-d87e-4ce1cdc9eaa0@2ndquadrant.com
Commits
-
Avoid memcpy() with a NULL source pointer and count == 0
- f0ff52f25cb9 12.6 landed
- 677f74e5bb83 14.0 landed
- 5a1d1b9540a4 13.2 landed
- 49aaabdf8d0b 11.11 landed
-
Avoid calling memcpy() with a NULL source pointer and count == 0.
- 13bba02271dc 9.6.0 cited