Re: BUG #6233: pg_dump hangs with Access Violation C0000005 - Mailing list pgsql-bugs

From Craig Ringer
Subject Re: BUG #6233: pg_dump hangs with Access Violation C0000005
Date
Msg-id 4E8CF0BB.8040605@ringerc.id.au
Whole thread Raw
In response to Re: BUG #6233: pg_dump hangs with Access Violation C0000005  ("Pavel Holec" <holec@email.cz>)
Responses Re: BUG #6233: pg_dump hangs with Access Violation C0000005  ("Pavel Holec" <holec@email.cz>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6226: Broken foreign key stored on database (parent deleted with children still readable, BUG#6225 Update)
Next
From: Daniel Cristian Cruz
Date:
Subject: Re: BUG #6226: Broken foreign key stored on database (parent deleted with children still readable, BUG#6225 Update)