Re: [FEATURE PATCH] pg_stat_statements with plans (v02) - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: [FEATURE PATCH] pg_stat_statements with plans (v02)
Date
Msg-id CAEepm=3D3PZM_514NBiPymtrs9XNYndM5thPw7u4O_yA=5_MjQ@mail.gmail.com
Whole thread Raw
In response to Re: [FEATURE PATCH] pg_stat_statements with plans (v02)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [FEATURE PATCH] pg_stat_statements with plans (v02)
Re: [FEATURE PATCH] pg_stat_statements with plans (v02)
List pgsql-hackers
On Mon, Aug 20, 2018 at 2:55 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@enterprisedb.com> writes:
> As previously noted, that seems like a nice thing to allow ...
>
>> + pgssPlan *planArray[numPlans];
>> Can't use variable length arrays in C89.
>
> ... but I'm less excited about this one.  Seems like a great opportunity
> for unexpected stack overflows, and thence at least the chance for
> DOS-causing security attacks.  Can we prevent that from being allowed,
> if we start using -std=c99?

-Werror=vla in GCC, apparently.

Another problem with VLAs is that they aren't in C++ and last I heard
they aren't ever likely to be (at least not with that syntax).  I'd rather not
introduce obstacles on that path.

-- 
Thomas Munro
http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] GnuTLS support
Next
From: Tatsuro Yamada
Date:
Subject: Re: Fix help option of contrib/oid2name