pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: Pavel Holec <holec@email.cz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6233: pg_dump hangs with Access Violation C0000005
Date: Thu, 06 Oct 2011 08:05:15 +0800
Message-ID: <4E8CF0BB.8040605@ringerc.id.au> (raw)
In-Reply-To: <!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAOIB7b5kpiZGi/Oruzj7KFcBAAAAAA==@email.cz>
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>
	<9004.1317787610@sss.pgh.pa.us>
	<!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAOIB7b5kpiZGi/Oruzj7KFcBAAAAAA==@email.cz>

On 10/05/2011 09:37 PM, Pavel Holec wrote:

> Yes, this is the problem. libpq.dll I have built in VC6. With original I had
> problem with msvcr80.dll and WinSxS because my end client app is also from
> VC6 and I can't prepare redist msvcr for end user. Can you advice me how to
> do it?

It would've been nice if you'd mentioned that ;-)

Running a msvcrt.dll libpq with a msvcr80.dll pg_dump should work, 
though; Windows programs are expected to cope with insane things like 
mixing multiple C runtimes. It sounds like there's a bug where pg_dump 
doesn't use the libpq memory management functions and instead does a 
direct free(); changing those crash sites you found to use PQfreemem 
should solve the problem. Try it and see.

Advise you how to do what?

By the way, you should be able to use a regular libpq compiled against 
msvcr80.dll with your VC6 client app so long as the client app uses 
PQfreemem to release memory allocated by libpq.

--
Craig Ringer



view thread (15+ messages)  latest in thread

Message-ID: <4E8CF0BB.8040605@ringerc.id.au>
Permalink:  ../4E8CF0BB.8040605@ringerc.id.au/
Also on:    postgresql.org/message-id/4E8CF0BB.8040605@ringerc.id.au

 · 

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: ringerc@ringerc.id.au, holec@email.cz, tgl@sss.pgh.pa.us, alvherre@commandprompt.com
  Subject: Re: BUG #6233: pg_dump hangs with Access Violation C0000005
  In-Reply-To: <4E8CF0BB.8040605@ringerc.id.au>
  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> <9004.1317787610@sss.pgh.pa.us> <!&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAOIB7b5kpiZGi/Oruzj7KFcBAAAAAA==@email.cz> <4E8CF0BB.8040605@ringerc.id.au>

* 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