Re: BUG #15541: Use after release in PQprint - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #15541: Use after release in PQprint
Date
Msg-id 16265.1544205750@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #15541: Use after release in PQprint  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #15541: Use after release in PQprint
List pgsql-bugs
I wrote:
> Wow, that is ancient.  It looks like commit edb519b14 of 27-Jul-1996
> added the pipe close stanza in the wrong place, and nobody's noticed
> it since.  That's probably not so surprising given the multiple
> conditions required to trigger it plus the fact that this whole
> function is, if not completely dead code, at least not used anywhere
> in the PG distribution.  Still, we oughta fix it.

Actually, looking closer at just what those conditions are: the
giant bit of spaghetti code at lines 177-188 will never enable the
pager if po->html3 is on.  Probably that was because of laziness
about counting lines correctly in that case, but anyway it means
the problem situation is unreachable, AFAICS.

It still seems worth fixing in HEAD, in case anyone ever tries to
remove that restriction; but I'm no longer feeling that we need
to back-patch it.

            regards, tom lane


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15541: Use after release in PQprint
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #15541: Use after release in PQprint