Re: [HACKERS] Major breakage? - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] Major breakage?
Date
Msg-id 36AE77FA.83BE9BA7@krs.ru
Whole thread Raw
In response to Re: [HACKERS] Major breakage?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> 
> Nope, Vadim broke something.  It looks like anything with a subplan
> will coredump in Monday's sources.  executor/nodeSubPlan.c has
> 
> bool
> ExecInitSubPlan(SubPlan *node, EState *estate, Plan *parent)
> {
>     ...
>     ExecCheckPerms(CMD_SELECT, 0, node->rtable, (Query *) NULL);
>                                                 ^^^^^^^^^^^^^^
> 
> (and has had that for a long time, evidently).  One of the additions
> Vadim checked in yesterday extends ExecCheckPerms() to try to use
> its parseTree argument --- unconditionally.  Guaranteed null-pointer
> dereference.
> 
> Perhaps ExecInitSubPlan is in error to pass a null parseTree; if not,         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
No.

> then ExecCheckPerms needs to be modified to cope.  I don't understand
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Yes.

> either routine enough to fix it correctly.

Thanks!

Unfortunately, I can't fix this in CVS - I'm changing
execMain.c now to support READ COMMITTED mode. Could someone
add check in ExecCheckPerms ?
Sorry.

Vadim


pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [PATCHES] mb support fix
Next
From: Tatsuo Ishii
Date:
Subject: MB big5 support patch (current)