pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Holec <holec@email.cz>
Cc: Craig Ringer <ringerc@ringerc.id.au>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6233: pg_dump hangs with Access Violation C0000005
Date: Wed, 05 Oct 2011 00:28:36 -0300
Message-ID: <1317784584-sup-6771@alvh.no-ip.org> (raw)
In-Reply-To: <6027.1317776669@sss.pgh.pa.us>
References: <201109282118.p8SLIwYx099581@wwwmaster.postgresql.org>
	<4E8422B0.5060404@ringerc.id.au>
	<!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAKoxZCnfy11Bjcdjb1Sap84BAAAAAA==@email.cz>
	<4E8A72E3.9080701@ringerc.id.au>
	<!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAEOddjeKN+JAi/9rqv7Z5K0BAAAAAA==@email.cz>
	<6027.1317776669@sss.pgh.pa.us>


Excerpts from Tom Lane's message of mar oct 04 22:04:29 -0300 2011:
> "Pavel Holec" <holec@email.cz> 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.

Isn't this the kind of thing that you have to enable explicitly? 

It's something like this, no?
http://msdn.microsoft.com/en-us/library/ff542911(v=VS.85).aspx

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (15+ messages)  latest in thread

Message-ID: <1317784584-sup-6771@alvh.no-ip.org>
Permalink:  ../1317784584-sup-6771@alvh.no-ip.org/
Also on:    postgresql.org/message-id/1317784584-sup-6771@alvh.no-ip.org

 · 

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: alvherre@commandprompt.com, tgl@sss.pgh.pa.us, holec@email.cz, ringerc@ringerc.id.au
  Subject: Re: BUG #6233: pg_dump hangs with Access Violation C0000005
  In-Reply-To: <1317784584-sup-6771@alvh.no-ip.org>
  References: <201109282118.p8SLIwYx099581@wwwmaster.postgresql.org> <4E8422B0.5060404@ringerc.id.au> <!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAKoxZCnfy11Bjcdjb1Sap84BAAAAAA==@email.cz> <4E8A72E3.9080701@ringerc.id.au> <!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAEOddjeKN+JAi/9rqv7Z5K0BAAAAAA==@email.cz> <6027.1317776669@sss.pgh.pa.us> <1317784584-sup-6771@alvh.no-ip.org>

* 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