pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Hughes <thh@cyberscience.com>
To: pgsql-odbc@postgresql.org
Subject: EN_Destructor bug?
Date: Wed, 19 Oct 2005 15:07:22 +0100
Message-ID: <yek1x2hy50l.fsf@dellow.uk.cyberscience.com> (raw)

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@cyberscience.com)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/

Attachments:

psqlodbc-environ.patch (text/x-patch, 1.2K) download ? .deps ? .libs ? Makefile ? Makefile.in ? acinclude.m4 ? aclocal.m4 ? autom4te.cache ? bind.lo ? columninfo.lo ? config.h ? config.h.in ? config.log ? config.status ? configure ? connection.lo ? convert.lo ? depcomp ? descriptor.lo ? dlg_specific.lo ? drvconn.lo ? environ.lo ? execute.lo ? info.lo ? info30.lo ? install-sh ? libtool ? libtool.m4 ? misc.lo ? missing ? multibyte.lo ? odbcapi.lo ? odbcapi30.lo ? odbcapi30w.lo ? odbcapiw.lo ? options.lo ? parse.lo ? pgapi30.lo ? pgtypes.lo ? psqlodbc.la ? psqlodbc.lo ? qresult.lo ? results.lo ? stamp-h1 ? statement.lo ? tuple.lo ? tuplelist.lo ? win_md5.lo ? win_unicode.lo Index: environ.c =================================================================== RCS file: /cvsroot/psqlodbc/psqlodbc/environ.c,v retrieving revision 1.54 diff -u -r1.54 environ.c --- environ.c 4 Oct 2005 19:03:19 -0000 1.54 +++ environ.c 19 Oct 2005 14:04:06 -0000 @@ -723,11 +723,16 @@ */ /* Free any connections belonging to this environment */ + ENTER_CONNS_CS; for (lf = 0; lf < MAX_CONNECTIONS; lf++) { if (conns[lf] && conns[lf]->henv == self) + { rv = rv && CC_Destructor(conns[lf]); + conns[lf] = NULL; + } } + LEAVE_CONNS_CS; DELETE_ENV_CS(self); free(self);

view thread (4+ messages)  latest in thread

Message-ID: <yek1x2hy50l.fsf@dellow.uk.cyberscience.com>
Permalink:  ../yek1x2hy50l.fsf@dellow.uk.cyberscience.com/
Also on:    postgresql.org/message-id/yek1x2hy50l.fsf@dellow.uk.cyberscience.com

 ·  · 

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-odbc@postgresql.org
  Cc: thh@cyberscience.com
  Subject: Re: EN_Destructor bug?
  In-Reply-To: <yek1x2hy50l.fsf@dellow.uk.cyberscience.com>
  References: <yek1x2hy50l.fsf@dellow.uk.cyberscience.com>

* 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