Skip site navigation (1) Skip section navigation (2)

EN_Destructor bug?

From: Tom Hughes <thh(at)cyberscience(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: EN_Destructor bug?
Date: 2005-10-19 14:07:22
Message-ID: yek1x2hy50l.fsf@dellow.uk.cyberscience.com (view raw or flat)
Thread:
Lists: pgsql-odbc
When EN_Destructor is called it searches through the connection array
and destroys any connections which belong that environment. Unfortunately
it doesn't NULL out the connection array entry afterwards so a future
call to EN_Destructor can wind up trying to destroy that connection
again if another environment has been allocated at the same address.

Also, shouldn't EN_Destructor hold the CONNS critical section while it
is playing with the connection array?

The attached patch fixes both of these issues and seems to have fixed
the crashes I was observing.

Tom

-- 
Tom Hughes (thh(at)cyberscience(dot)com)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/


Attachment: psqlodbc-environ.patch
Description: text/x-patch (1.2 KB)

pgsql-odbc by date

Next:From: SérgioDate: 2005-10-19 15:52:30
Subject: Re: ODBC driver and linked server in MSSQL 2k
Previous:From: Greg MartinDate: 2005-10-18 06:01:58
Subject: Re: unixODBC vs postgeSQL driver on RHEL4?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group