Re: BUG #8461: PostgreSQL 9.3 pg_dump heap corruptions

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Benjamin Wassermann <benny(at)hegne(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8461: PostgreSQL 9.3 pg_dump heap corruptions
Date: 2014-02-24 17:33:22
Message-ID: 20140224173322.GC16943@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Feb 14, 2014 at 11:01:11PM -0500, Bruce Momjian wrote:
> Actually, there are many places where Windows binaries free memory
> allocated by libpq. This is possible because of the way we compile
> libpq and the binary. Our PQfreemem() manual page has the details
>
> It is particularly important that this function, rather than
> free(), be used on Microsoft Windows. This is because allocating
> memory in a DLL and releasing it in the application works only if
> multithreaded/single-threaded, release/debug, and static/dynamic
> flags are the same for the DLL and the application. On non-Microsoft
> Windows platforms, this function is the same as the standard library
> function free().
>
> If the free() was not working for you, my guess is that you had
> mismatched flags for libpq and pg_dump compiles.
>
> However, you were right that there was a memory leak in that area of the
> code related to how funcfullsig and aggfullsig were conditionally
> assigned values, but not freed.
>
> The attached patch fixes this memory leak; not sure if this should be
> back-patched.

Patch applied. I have not backpatched this.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message brian 2014-02-24 18:34:40 BUG #9337: SSPI/GSSAPI with mismatched user names
Previous Message Bruce Momjian 2014-02-24 17:24:15 Re: Bad behaviour on some geometric operations on degenerate polygons