[postgis-devel] PgSQL 12 and -Werror=vla

Paul Ramsey pramsey at cleverelephant.ca
Thu Nov 1 15:13:08 PDT 2018


I see that trunk and 2.5 mostly already had fixes in place for this and
have brought them to 2.4 as well.

P.

On Wed, Oct 31, 2018 at 3:15 PM Even Rouault <even.rouault at spatialys.com>
wrote:

> On mercredi 31 octobre 2018 14:25:34 CET Paul Ramsey wrote:
> > Looks like it was Andres, about two months ago, during the switch to
> > "modern" C99
> >
> >
> https://github.com/postgres/postgres/blame/696b0c5fd0a8765fe6dfd075a30be06b4
> > 48fd615/configure.in#L488
> >
> > Wikipedia commentary :)
> >
> > https://en.wikipedia.org/wiki/Variable-length_array#C99
>
> Beyond Linus' arguments about speed and code size which aren't really
> relevant
> here unless you're counting the number of CPU cycles, looking a bit at the
> code for the below cases, the use of VLAs seems inappropriate as the size
> argument could be pretty huge, being the number of points of the input
> geometries. Surprising that nobody hasn't come up yet with gigantic
> geometries
> that would blow up the stack of the process ( typically the default stack
> size
> of a Linux process is 8 MB, so a geometry with ~ 262 000 points would blow
> the
> stack). I wouldn't call fixing that bikeshedding.
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20181101/1894df38/attachment.html>


More information about the postgis-devel mailing list