Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
From: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
To: maumau307@gmail.com
Cc: thomas.munro@enterprisedb.com, pgsql-hackers@postgresql.org,
meskes@postgresql.org
Date: 2018-03-26T05:07:48Z
Lists: pgsql-hackers
Attachments
- pgtypes_freemem_v4.patch (text/x-patch) patch v4
At Sun, 25 Mar 2018 22:15:52 +0900, "MauMau" <maumau307@gmail.com> wrote in <B3BEB35436E3471095762969E2FCEDD6@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
Commits
-
Add PGTYPESchar_free() to avoid cross-module problems on Windows.
- edabd8f5a424 9.3.24 landed
- db05d0b906be 9.4.19 landed
- 3bc19d0d263c 9.5.14 landed
- b5b973ef0ba7 9.6.10 landed
- 3566873f2190 10.5 landed
- 4c8156d87108 11.0 landed