Re: [BUG] ECPG crash with union type
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-25T20:46:05Z
Lists: pgsql-hackers
Jehan-Guillaume de Rorthais <jgdr@dalibo.com> writes: > One of our customer hit a sigsev with ecpg lately. Their team created a simple > scenario and point us the origin of the crash in ECPG code. The credit goes to > them (iMSA) for that work. > ... > If setting "$$.type_sizeof = NULL;" is legit for unions (I didn't try to wrap > my head around this code), maybe this change should be: > - ne->struct_sizeof = struct_sizeof; > + ne->struct_sizeof = struct_sizeof ? mm_strdup(struct_sizeof):NULL; Yeah, I agree. Will fix, thanks for the report! regards, tom lane
Commits
-
Fix null-pointer crash in ECPG compiler.
- 917fdbc633e2 18 (unreleased) landed
- 7f5e0b22e5ea 19 (unreleased) landed
-
ecpg: fix some memory leakage of data-type-related structures.
- 0e6060790d65 18.0 cited