Re: UBSAN crash in EventTriggerCollectAlterTSConfig (memcpy with NULL src)
Álvaro Herrera <alvherre@kurilemu.de>
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Florin Irion <irionr@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2026-03-03T19:48:45Z
Lists: pgsql-hackers
Attachments
On 2026-Mar-03, Florin Irion wrote: > While working on the pg_get_domain_ddl() patch [1], I installed an > event trigger on ddl_command_end in test_setup.sql to automatically > round-trip DDL. This triggered a UBSAN crash on CI [2] that turns out > to be a pre-existing bug since b488c580aef(?). Cool, yeah, this is broken. I propose to add the corresponding test in src/test/modules/test_ddl_deparse though -- that way we don't need another event trigger. So how about like this? -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "No es bueno caminar con un hombre muerto"
Commits
-
Don't malloc(0) in EventTriggerCollectAlterTSConfig
- e2ee58eec079 18.4 landed
- e0a9c6463509 14.23 landed
- ce4fbe1ac6e9 19 (unreleased) landed
- 988b9588dadb 15.18 landed
- 616798d0114a 17.10 landed
- 46c54d3d2f3e 16.14 landed