Re: (libpq) PQclear on questionable result pointer.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: wade <wade(at)wavefire(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: (libpq) PQclear on questionable result pointer.
Date: 2002-08-30 17:01:56
Message-ID: 6905.1030726916@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

wade <wade(at)wavefire(dot)com> writes:
> The problem arrises when the result object pointer you are passing to clear
> contains not a null and not a valid result object address, but a junk pointer.
> PQclear() seg faults when the address is outside of the data segment.
> (libpq bug?)

No, that's a bug in *your* code. Passing a bogus pointer to any library
anywhere will make it segfault, because there's no reasonable way to
verify a pointer.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-30 17:04:13 Re: make failure on cvs tip
Previous Message wade 2002-08-30 16:56:58 (libpq) PQclear on questionable result pointer.