Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wDGmH-002nY8-1z for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Apr 2026 07:04:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wDGmF-004VH4-1y for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Apr 2026 07:04:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wDGmF-004VGw-0c for pgsql-hackers@lists.postgresql.org; Thu, 16 Apr 2026 07:04:39 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wDGmB-00000001H88-3PMO for pgsql-hackers@postgresql.org; Thu, 16 Apr 2026 07:04:37 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-68a253b7301so4016260eaf.1 for ; Thu, 16 Apr 2026 00:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776323070; cv=none; d=google.com; s=arc-20240605; b=Xo6WcMsLn9Mdq/JqVYROuxPTiX8UI0lmXKHaOU0jw1SLvWklt+I2dXRVlCy/on2yD3 7Wfy6nSu3x3Yx8OEkRhKT6qmt0PltZIOg0mWwa6s0OGuF1aHikDTuhb5mmSK3PkrrPHa FEicmjivJXZ+isC0WCWZGVoO7XES4yOECRFAJTM4h3MQ8wncPI/4NoFlgV+L8cci6YaG 4Rp35qYUN+oYCJbeZWoYM/VmVlrg0aUSkHgZPhX5kFrbdqayntgqE8CnQVgJ3B/AlyUF 4yuMuv4rLnXM5dB01eKjy0GWklW6DecaAv+WCZc6CuOHOQKILBGAMQPzMVm2aWhEdZUN M00w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=dqjAw2Vlnv+T1rTjxrym4lfwRc9dOobEvpcy7hQ5Tu0=; fh=ZUT6hu/tL/aG2SsPYKUaFy47LUO6SRc/sa7UiC3vIKc=; b=hZe63G1pGfN3qsTv3Hydcrss8xZ9iQj3iRm43CEmT/VwBYAzFVWBZTpZrCvoCH9GkA 5jAkywT2eSGuUdYrEoXPTp0r3GKytEQalA790rXaW4OqjD9lrPkn1+jHI0uyFkS7bARR r8yMr0Bn2L5hMLgQqc2XxT7PzsO26ch7oIS9s7GC3bSr3QCy+42eORWOGTryK1F5TTOk Fj5tyd37c3nHDcKfA7NrcToO1ItLjZNRxMoSS31M0I/VOZKcwrs9mODQzKn/q6FUxBSa EBJoj4wyJ9yawePntvOGZA86iQFSlzadbMeFEqTi/wMCjHB4JcbFkS9XeymAUz28CptL vVwg==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1776323070; x=1776927870; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dqjAw2Vlnv+T1rTjxrym4lfwRc9dOobEvpcy7hQ5Tu0=; b=j7lisjvDVJC29oP+DwA6QwzJZn/gzqICMiQs/jthbqFHbc2E0XxjFycvQlOvwZFFkt ySDw6xnZUfgUk7Lhi0bJ3MEyl6DKd5+w9Nonu160/1CEfMhzLdI1dF4REiN4lcD3d90m s51LtQF0o0o4qQKHHVRgPAAG5996tgx8nEBxzksmUbLnmGL0MhDON3eHeR8OsiFy+BFC k1KGErFxXmSaA+FZH+HQsEqASOyDtUwYQ7fMl/n+KPnYadwljH/vX2Dl38n68o/EAGFN OF2MMKniNjMLfN7wunyG4F3vKN4cWuWNFA0FSEE9dpUat7oOdGSEMotLgmuaCpETNq2H HnFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776323070; x=1776927870; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dqjAw2Vlnv+T1rTjxrym4lfwRc9dOobEvpcy7hQ5Tu0=; b=TM4U51bCUCb/GrnNsnPqZ8arQJXyCwb2VnUYDhr7ZjV7ng/s+il2apZv3UwVg3z2wX U62BwyUD0ipic6b1GB6hPhl9gWs5e42q878g1VszSiqwwaF31YsVKeW9qOpqKQYAD48Z mzj+otgaM/N0kbhIVxkzZ5S/quiMnx+/Gk66wX1f313uWkk66KO/ANmcx1+ta7J/KZKf jkU5TRUoXL980TFc4VgZFCc6CR7MFRO0lVjyTwhA2UHE2afmQAdUlM68T3P6py0D14KG PArCLb5M2Nhs6OqDBJGa5izMGw/7WDvhDacDU8HgNAQdmQkZrz3nq13EjAjevKd6q4Ek zGoA== X-Forwarded-Encrypted: i=1; AFNElJ93MUILydCFwV5RUdT/RygZtfqwym75b2q1grNiYuMUxaHKZrXz2B4oOKTTaSBR9MfMmfO0qu3nBBtWrTu5@postgresql.org X-Gm-Message-State: AOJu0YzX0FNW0Lsx9vKEb+VSEmK+fvHhbAT7SGYJ6IrTeT2m5rowLH1v TAouMzm6RT0fSp0GRpzmyZEFMtwkg62AjjKaHpyRght210f31WF1eiAsEOYQRtY//RAOOtosvfZ C+LoXSLBGJY7O/gzwhQ02DcsoPnnnfwhOH3SU7uHY X-Gm-Gg: AeBDievngQistbZOcioa+c4Yo4EY1x8FkwFeo48KWbt8f7KHSZxQSu0bL/SVoi7d39U 357cKM01oArX58prYqq9M92TLQY2DL3fahOKiTEUPKPNf7gV0vp8YbV/go+dkGCInJYnwwf+6dM JAaUstAN7XvoDHQWVuKsGOsiUvHAjbAuViDG+E+f+RRYpTgHg1ySuA0swrEr4eVdV9zm76ybIjh 1j0tNTQvOwjNx3ldxw9WPp7MlyBUey6Gl3OGYjqXGk8/GeM0paHC5bzXXTwDGdQYh6oE8jcd/6P Dhn5+JyG X-Received: by 2002:a05:6820:1351:b0:686:c7a9:d64c with SMTP id 006d021491bc7-68be84d179cmr12750181eaf.43.1776323070388; Thu, 16 Apr 2026 00:04:30 -0700 (PDT) MIME-Version: 1.0 References: <3007317.1765210195@sss.pgh.pa.us> In-Reply-To: From: Nishant Sharma Date: Thu, 16 Apr 2026 12:34:19 +0530 X-Gm-Features: AQROBzCFByHRijSbxedgfHggoICUB3J12Dg0gkMOJseilwxcmwN40VPLd1vsY50 Message-ID: Subject: Re: [BUG] CRASH: ECPGprepared_statement() and ECPGdeallocate_all() when connection is NULL To: Shruthi Gowda Cc: Mahendra Singh Thalor , Fujii Masao , Tom Lane , PostgreSQL Development Content-Type: multipart/alternative; boundary="0000000000009e0244064f8e71bb" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009e0244064f8e71bb Content-Type: text/plain; charset="UTF-8" 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/ > --0000000000009e0244064f8e71bb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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_tes= t on master, REL_18, REL_17, and REL_16 using both make and meson.

T= he 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 t= est patch on PG15 and PG14 branch, appears meson.build for test is not ther= e on these branches. Need to remove all meson related changes for these bra= nches.
2. char val2[5] =3D "data1"; --> val2's size wil= l not be able to fit '\0' for the string. As size of val2 and numbe= r of characters in "data1" are exactly same?
3. "exec sql= disconnect;" - Do we need this at the end as we have already disconne= cted before Test 2.
3. Minor - Do we need "printf("sqlca.sqlco= de =3D %ld\n", sqlca.sqlcode);"? I see all others have it, but no= t Test 4?


R= egards,
Nishant Sharma,
Pune, EDB.
--0000000000009e0244064f8e71bb--