Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WHzPD-0003Kv-8W for pgsql-bugs@arkaria.postgresql.org; Mon, 24 Feb 2014 17:33:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WHzPC-0008KX-Lt for pgsql-bugs@arkaria.postgresql.org; Mon, 24 Feb 2014 17:33:26 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WHzPB-0008JJ-Ne for pgsql-bugs@postgresql.org; Mon, 24 Feb 2014 17:33:25 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WHzP9-0007yW-Dy for pgsql-bugs@postgresql.org; Mon, 24 Feb 2014 17:33:25 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1WHzP8-00032j-7f; Mon, 24 Feb 2014 12:33:22 -0500 Date: Mon, 24 Feb 2014 12:33:22 -0500 From: Bruce Momjian To: Benjamin Wassermann Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8461: PostgreSQL 9.3 pg_dump heap corruptions Message-ID: <20140224173322.GC16943@momjian.us> References: <1381753906060-5774487.post@n5.nabble.com> <20140215040111.GA15047@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140215040111.GA15047@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 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