Re: BUG #6233: pg_dump hangs with Access Violation C0000005

From: "Pavel Holec" <holec(at)email(dot)cz>
To: "'Craig Ringer'" <ringerc(at)ringerc(dot)id(dot)au>
Cc: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Alvaro Herrera'" <alvherre(at)commandprompt(dot)com>, "'Pg Bugs'" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6233: pg_dump hangs with Access Violation C0000005
Date: 2011-10-07 10:51:18
Message-ID: !&!AAAAAAAAAAAYAAAAAAAAAE8q5Jcv4mJImRanr8cGRrPCgAAAEAAAAOAXFRTCq71LkWIYaL6w/PYBAAAAAA==@email.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


-----Original Message-----
From: Craig Ringer [mailto:ringerc(at)ringerc(dot)id(dot)au]
Sent: Thursday, October 06, 2011 2:05 AM
To: Pavel Holec
Cc: 'Tom Lane'; 'Alvaro Herrera'; 'Pg Bugs'
Subject: Re: [BUGS] BUG #6233: pg_dump hangs with Access Violation C0000005

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

PQfreemem is what I've been thinking about - great.

With SxS I see problem if customer have a clear new installation of WinXP
and no msvcrt80.dll. I'm not be able to ship this dll with installaton of my
client - when I use for example Inno setup.

Isn't possible to have redistribute package with proper version msvcrt80.dll
accord with your binaries on the wb site?

Pavel Holec

PS: Thank You all so much

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Craig Ringer 2011-10-07 11:28:45 Re: BUG #6233: pg_dump hangs with Access Violation C0000005
Previous Message pasman 2011-10-07 10:41:26 BUG #6243: Strange result of to_date function