Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqQ1Q-0004ir-AC for pgsql-odbc@arkaria.postgresql.org; Sat, 19 Dec 2020 00:22:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kqQ1P-0006d6-2E for pgsql-odbc@arkaria.postgresql.org; Sat, 19 Dec 2020 00:22:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqQ1O-0006cz-Kq for pgsql-odbc@lists.postgresql.org; Sat, 19 Dec 2020 00:22:54 +0000 Received: from mx.prosoftsystems.ru ([212.23.72.204]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1kqQ1L-0007TX-Kh for pgsql-odbc@postgresql.org; Sat, 19 Dec 2020 00:22:53 +0000 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_194f365f33f640fd9397c4608819e06fprosoftsystemsru_" DKIM-Signature: v=1; a=rsa-sha256; d=prosoftsystems.ru; s=ps; c=relaxed/relaxed; t=1608337367; h=from:to:date:message-id:subject; bh=+yCG5fNn14G3ZpK3/vNxzLcYlaE5T7dn/lFY/I8jrF8=; b=Aljb4Y0UvQZYpXDCvtzUvqyY58CxCWXIbnqMz0nsRNck3DsmNJswwtntOGJskUZw1e9ieh8SSsR 8CTey3nShYvf8elnZmkiexPqei9zKHptndxYL19n0TlJdKcfxgcS8PJL+klO6NDJdmXSSQoC8zxqW F6SaYvB1vLPIWXIHgcSlJ5XdevEB9QGOGz5Ar6piQ5yEoXCpLbmbQZ5qVpGVkLNxb6ULdzIOXerqA PpYjEZcj6zhCDrAoBfEa+yd/r7XxYNY5OQ+rjdDvHWkwfpK3TyD3zQDDTzikmHHN12anzQVGR+Wk0 vIdWAavvOhJs8DFXVmO+kujrJB5Els7w88nQ== Received: from echo-2.prosoft.ural.ru (172.21.245.22) by mx.prosoftsystems.ru (172.25.245.33) with Microsoft SMTP Server (TLS) id 15.1.396.30; Sat, 19 Dec 2020 05:22:47 +0500 Received: from echo-2.prosoft.ural.ru (172.21.245.22) by echo-2.prosoft.ural.ru (172.21.245.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.595.3; Sat, 19 Dec 2020 05:22:48 +0500 Received: from echo-2.prosoft.ural.ru ([::1]) by echo-2.prosoft.ural.ru ([fe80::2cda:c04e:9fcf:d349%17]) with mapi id 15.02.0595.003; Sat, 19 Dec 2020 05:22:48 +0500 From: =?koi8-r?B?8MXS28nOIODSycog8MXU0s/Xyd4=?= To: "pgsql-odbc@postgresql.org" Subject: RE: windows AppVerifier reports memory leak after strdup (psqlodbc35w.dll ver 13.00) Thread-Topic: windows AppVerifier reports memory leak after strdup (psqlodbc35w.dll ver 13.00) Thread-Index: AdbVd3G5CUF/gqoqQb+wdJq2TtE5pQAJXz/g Date: Sat, 19 Dec 2020 00:22:48 +0000 Message-ID: <194f365f33f640fd9397c4608819e06f@prosoftsystems.ru> References: In-Reply-To: Accept-Language: ru-RU, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.1.89] MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_194f365f33f640fd9397c4608819e06fprosoftsystemsru_ Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Steps to reproduce subj: 1. Add wscript.exe to AppVerifier with Basics.Leak check 2. Create file pg_leak.vbs with the following code (replace YOUR_CONNECTION= _STRING with yours): Set c =3D CreateObject("ADODB.Connection") c.Open "YOUR_CONNECTION_STRING" Set cmd =3D CreateObject("ADODB.Command") Set cmd.ActiveConnection =3D c cmd.ActiveConnection.CursorLocation =3D 3 'clUseClient cmd.CommandText =3D "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES" cmd.CommandType =3D 1 'adCmdText Set r =3D CreateObject("ADODB.Recordset") r.Open cmd, , 1, 3, 1 'ctKeySet, ltOptimistic, adCmdText MsgBox r.Fields(0).Value 3. Execute wscript.exe pg_leak.vbs 4. Launch AppVerifier.exe and see if it was happy with last wscript.exe ses= sion (was not happy) 5. Comment out line about CursorLocation and repeat steps 3-4. You should s= ee the subj just disappeared. --_000_194f365f33f640fd9397c4608819e06fprosoftsystemsru_ Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable

Steps t= o reproduce subj:

1. Add = wscript.exe to AppVerifier with Basics.Leak check

2. Crea= te file pg_leak.vbs with the following code (replace YOUR_CONNECTION_STRING= with yours):
Set c =3D CreateObject("ADODB.Connection")

c.Open = "YOUR_CONNECTION_STRING"

Set cmd= =3D CreateObject("ADODB.Command")

Set cmd= .ActiveConnection =3D c

cmd.Act= iveConnection.CursorLocation =3D 3 'clUseClient

cmd.Com= mandText =3D "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES"

cmd.Com= mandType =3D 1 'adCmdText

Set r = =3D CreateObject("ADODB.Recordset")

r.Open = cmd, , 1, 3, 1 'ctKeySet, ltOptimistic, adCmdText

MsgBox = r.Fields(0).Value
3. Execute wscript.exe pg_leak.vbs
4. Launch AppVerifier.exe and see if it was happy with last wscript.exe ses= sion (was not happy)

5. Comm= ent out line about CursorLocation and repeat steps 3-4. You should see the = subj just disappeared.

&n= bsp;

--_000_194f365f33f640fd9397c4608819e06fprosoftsystemsru_--