Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: maumau307(at)gmail(dot)com
Cc: thomas(dot)munro(at)enterprisedb(dot)com, pgsql-hackers(at)postgresql(dot)org, meskes(at)postgresql(dot)org
Subject: Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows
Date: 2018-03-26 05:07:48
Message-ID: 20180326.140748.178321572.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Sun, 25 Mar 2018 22:15:52 +0900, "MauMau" <maumau307(at)gmail(dot)com> wrote in <B3BEB35436E3471095762969E2FCEDD6(at)tunaPC>
> And thank you for your review. All modifications are done.

Thank you for the new version. I marked this as "Ready for
Committer" with one change.

- Windows requires this since different versions (MT/non-MT and
DEBUG/RELEASE?) of CRT are not compatible on malloc/free, which
is the same reason for PQfreemem().

- It applies on the master HEAD cleanly. Compiled with no
error. (Except for having some warnings with MSB8018 *1 for
some mb modules and seemingly harmless C4818 for many files and
this patch is not to blame.)

- Documentation looks fine.

- The change on regtest looks fine and ran sucessfully on both
Linux and Windows (vcregress ecpgcheck). But it doesn't prove
anything about the different versions of CRT library. (The
same can be said about PQfreemem())

- Style looks fine with one exception that extern "C" is
increasing indentation, so I fixed that in the attached
version.

*1: "The intermediate directory contains files shared from
another project" for pg_archivecleanup, pg_stat_statements,
pg_isolation_regress, latin2_and_win1250, utf8_and_cyrillic,
utf8_and_iso8859 and utf8_and_sjis2004.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
pgtypes_freemem_v4.patch text/x-patch 41.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2018-03-26 05:12:41 Re: Re: csv format for psql
Previous Message Jacob Champion 2018-03-26 04:47:45 Re: Proposal: http2 wire format