Re: Undefined behavior detected by new clang's ubsan
John Naylor <johncnaylorls@gmail.com>
From: John Naylor <johncnaylorls@gmail.com>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-01-20T06:13:30Z
Lists: pgsql-hackers
On Tue, Jan 20, 2026 at 12:00 PM Alexander Lakhin <exclusion@gmail.com> wrote: > ../../src/include/lib/sort_template.h:314:15: runtime error: applying non-zero offset 8 to null pointer > SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../src/include/lib/sort_template.h:314:15 Where does it think a NULL pointer is coming from? -- John Naylor Amazon Web Services
Commits
-
Future-proof sort template against undefined behavior
- 7467041cde9e 19 (unreleased) landed
-
Fix various instances of undefined behavior
- 176dffdf7d2a 19 (unreleased) landed
- fc56793c9ae5 14.21 landed
- b5e1cd2fdca1 18.2 landed
- 73ac2b37401d 16.12 landed
- 6b81a1c7c905 15.16 landed
- 1662cd0cb7ae 17.8 landed