Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0791AB5DBC4 for ; Tue, 4 Oct 2011 22:04:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 11928-04 for ; Wed, 5 Oct 2011 01:04:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 18CD3B5DC17 for ; Tue, 4 Oct 2011 22:04:38 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p9514TsI006028; Tue, 4 Oct 2011 21:04:29 -0400 (EDT) To: "Pavel Holec" cc: "'Craig Ringer'" , pgsql-bugs@postgresql.org Subject: Re: BUG #6233: pg_dump hangs with Access Violation C0000005 In-reply-to: References: <201109282118.p8SLIwYx099581@wwwmaster.postgresql.org> <4E8422B0.5060404@ringerc.id.au> <4E8A72E3.9080701@ringerc.id.au> Comments: In-reply-to "Pavel Holec" message dated "Wed, 05 Oct 2011 00:55:18 +0200" Date: Tue, 04 Oct 2011 21:04:29 -0400 Message-ID: <6027.1317776669@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/36 X-Sequence-Number: 31306 "Pavel Holec" writes: > In the meantime I tried debug in msvc2005 (Win7/32) and > free(funcsig); in pg_dump.c line 7510 cause > _ASSERTE(_CrtIsValidHeapPointer(pUserData)); in dbgheap.c line 1252 > * If this ASSERT fails, a bad pointer has been passed in. It may be > * totally bogus, or it may have been allocated from another heap. > * The pointer MUST come from the 'local' heap. > If I comment free(funcsig); and next one free(funcsig_tag); pg_dump works fine. Hmm. I can see how that would happen if you're using one of the Windows environments wherein malloc's done inside libpq have to be free'd inside libpq. (The PQExpBuffer support code is in libpq...) However, the flaw in that explanation is that it would basically mean pg_dump doesn't work at all on Windows, at least not if you have any user-defined functions, and probably some other cases too because there seem to be multiple instances of the dubious coding. It's a bit hard to believe that nobody's noticed that before. regards, tom lane