Re: [BUG] CRASH: ECPGprepared_statement() and ECPGdeallocate_all() when connection is NULL

Shruthi Gowda <gowdashru@gmail.com>

From: Shruthi Gowda <gowdashru@gmail.com>
To: SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>, Nishant Sharma <nishant.sharma@enterprisedb.com>, 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-05-25T07:46:20Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add missing connection validation in ECPG

On Sun, May 24, 2026 at 12:29 AM SATYANARAYANA NARLAPURAM <
satyanarlapuram@gmail.com> wrote:

> Hi
>
> On Fri, May 1, 2026 at 12:21 PM Andrew Dunstan <andrew@dunslane.net>
> wrote:
>
>>
>>
>> On Wed, Apr 22, 2026 at 12:27 AM Nishant Sharma <
>> nishant.sharma@enterprisedb.com> wrote:
>>
>>> Thanks Shruthi!
>>>
>>> v5 code, v4_test and v4_test_15 patches look good to me.
>>>
>>> I checked ECPG regression on master, REL_18, REL_17, REL_16, REL_15,
>>> REL_14 using both make and meson.
>>>
>>> I have finished my review work on the patches. Thank you!
>>>
>>>
>>>
>>>
>> Thanks, everybody, pushed (as combined patches)
>>
>
> Looks like this committed a case, attached a patch to fix this.
>
> Thanks,
> Satya
>
>
Thanks Satya for looking into this. However, we don't need to add the
validation here because the caller ecpg_do_prologue*()* has already taken
care of it. Adding it again would be redundant. What do you think?

Thanks & Regards,

Shruthi K C

EnterpriseDB: http://www.enterprisedb.com