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

Поиск
Список
Период
Сортировка
Искать
От
Tsunakawa, Takayuki
Тема
[bug fix] ECPG: freeing memory for pgtypes crashes on Windows
Дата
Msg-id
0A3221C70F24FB45833433255569204D1F8AD5D6@G01JPEXMBYT05
Список
Дерево обсуждения
[bug fix] ECPG: freeing memory for pgtypes crashes on Windows "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows Thomas Munro <thomas.munro@enterprisedb.com>
RE: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows "MauMau" <maumau307@gmail.com>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows Thomas Munro <thomas.munro@enterprisedb.com>
RE: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows Thomas Munro <thomas.munro@enterprisedb.com>
RE: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
RE: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows Thomas Munro <thomas.munro@enterprisedb.com>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows "MauMau" <maumau307@gmail.com>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows Tom Lane <tgl@sss.pgh.pa.us>
Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows Robert Haas <robertmhaas@gmail.com>
Hello,

Some user hit a problem with ECPG on Windows.  The attached patch is a fix for it.  I'd appreciate it if you could backport this in all supported versions.

The problem is simple.  free() in the following example crashes:

	char *out;

	out = PGTYPESnumeric_to_asc(...);
	free(out);

The cause is the mismatch of the version of C runtime library.  The version of Visual Studio used to build the application was different from that for building PostgreSQL (libpgtypes.dll).

The fix is to add PGTYPES_free() in libpgtypes.dll, just like libpq has PQfreemem() described here:

https://www.postgresql.org/docs/devel/static/libpq-misc.html


Regards
Takayuki Tsunakawa

В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата:
От: Amit Kapila
Дата:
FAQ