Re: [BUG] CRASH: ECPGprepared_statement() and ECPGdeallocate_all() when connection is NULL
Nishant Sharma <nishant.sharma@enterprisedb.com>
From: Nishant Sharma <nishant.sharma@enterprisedb.com>
To: Shruthi Gowda <gowdashru@gmail.com>
Cc: Mahendra Singh Thalor <mahi6run@gmail.com>,
Fujii Masao <masao.fujii@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2026-04-16T07:04:19Z
Lists: pgsql-hackers
Thanks Shruthi for the new patches!
I can apply v5 on all active branches (i.e master, REL_18, REL_17, REL_16,
REL_15, REL_14).
I checked PG's ECPG regression with v5 and v2_test on master, REL_18,
REL_17, and REL_16 using both make and meson.
The v5 patch looks good to me now. I only have a few observations on
v2_test patch.
Review comments on v2_test:
1. Not able to apply the v2 test patch on PG15 and PG14 branch, appears
meson.build for test is not there on these branches. Need to remove all
meson related changes for these branches.
2. char val2[5] = "data1"; --> val2's size will not be able to fit '\0' for
the string. As size of val2 and number of characters in "data1" are exactly
same?
3. "exec sql disconnect;" - Do we need this at the end as we have already
disconnected before Test 2.
3. Minor - Do we need "printf("sqlca.sqlcode = %ld\n", sqlca.sqlcode);"? I
see all others have it, but not Test 4?
Regards,
Nishant Sharma,
Pune, EDB.
https://www.enterprisedb.com/
>
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add missing connection validation in ECPG
- f0e3f9732d41 14.23 landed
- 6916f4410051 15.18 landed
- 7e4c871f4181 16.14 landed
- 5d67549d9412 17.10 landed
- e2688ea5e411 18.4 landed
- c34a280c85b3 19 (unreleased) landed