Re: Clang UndefinedBehaviorSanitize (Postgres14) Detected undefined-behavior
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Noah Misch <noah@leadboat.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@2ndquadrant.com>, Ranier Vilela <ranier.vf@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-08-28T16:54:42Z
Lists: pgsql-hackers
On Thu, Aug 27, 2020 at 11:04 PM Noah Misch <noah@leadboat.com> wrote: > On Thu, Aug 27, 2020 at 11:11:47PM -0400, Tom Lane wrote: > > It's surely not hard to visualize cases where necessary code could > > be optimized away if the compiler thinks it's entitled to assume > > such things. > > Good point. I wonder if we should start using -fno-delete-null-pointer-checks: https://lkml.org/lkml/2018/4/4/601 This may not be strictly relevant to the discussion, but I was reminded of it just now and thought I'd mention it. -- Peter Geoghegan
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