pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Benjamin Wassermann <benny@hegne.de>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8461: PostgreSQL 9.3 pg_dump heap corruptions
Date: Mon, 24 Feb 2014 12:33:22 -0500
Message-ID: <20140224173322.GC16943@momjian.us> (raw)
In-Reply-To: <20140215040111.GA15047@momjian.us>
References: <E1VMEdk-00031c-R3@wrigleys.postgresql.org>
	<1381753906060-5774487.post@n5.nabble.com>
	<20140215040111.GA15047@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)

Message-ID: <20140224173322.GC16943@momjian.us>
Permalink:  ../20140224173322.GC16943@momjian.us/
Also on:    postgresql.org/message-id/20140224173322.GC16943@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, benny@hegne.de
  Subject: Re: BUG #8461: PostgreSQL 9.3 pg_dump heap corruptions
  In-Reply-To: <20140224173322.GC16943@momjian.us>
  References: <E1VMEdk-00031c-R3@wrigleys.postgresql.org> <1381753906060-5774487.post@n5.nabble.com> <20140215040111.GA15047@momjian.us> <20140224173322.GC16943@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox