Synchronize with imath upstream

2019-02-02 Thread Noah Misch
pgcrypto bundles a copy of the imath library for arbitrary-precision integer arithmetic in non-SSL builds. Upstream fixed buffer overflows through the years, and commit 8b59672 brought those fixes into PostgreSQL. In master, I would like to fully resynchronize with fresh imath 1.29. We're better

Re: Synchronize with imath upstream

2019-02-16 Thread Noah Misch
On Thu, Feb 07, 2019 at 11:56:18PM -0500, Tom Lane wrote: > Noah Misch writes: > > On Thu, Feb 07, 2019 at 10:12:05AM -0500, Tom Lane wrote: > >> I have no particular opinion on whether pgindent should be part of the > >> mix for imath, but I do strongly recommend setting up and documenting a > >>

Re: Synchronize with imath upstream

2019-02-16 Thread Tom Lane
Noah Misch writes: > On Thu, Feb 07, 2019 at 11:56:18PM -0500, Tom Lane wrote: >> Maybe easier to keep the instructions in a separate README file? > Most imath.c patches have cause to update those lines, and patches to other > files almost never do. Hence, I think hackers are more likely to find

Re: Synchronize with imath upstream

2019-02-16 Thread Noah Misch
On Sat, Feb 16, 2019 at 02:12:50PM -0500, Tom Lane wrote: > Noah Misch writes: > > On Thu, Feb 07, 2019 at 11:56:18PM -0500, Tom Lane wrote: > >> Maybe easier to keep the instructions in a separate README file? > > > Most imath.c patches have cause to update those lines, and patches to other > >

Re: Synchronize with imath upstream

2019-02-02 Thread Andrew Gierth
> "Noah" == Noah Misch writes: Noah> If the compiler supports -Wdeclaration-after-statement, I add Noah> -Wno-declaration-after-statement for imath.c. I found it much simpler to strip out -Wdeclaration-after-statement instead: $(RYU_OBJS): override CFLAGS := $(filter-out -Wdeclaration-af

Re: Synchronize with imath upstream

2019-02-02 Thread Noah Misch
On Sun, Feb 03, 2019 at 06:01:51AM +, Andrew Gierth wrote: > > "Noah" == Noah Misch writes: > > Noah> If the compiler supports -Wdeclaration-after-statement, I add > Noah> -Wno-declaration-after-statement for imath.c. > > I found it much simpler to strip out -Wdeclaration-after-stateme

Re: Synchronize with imath upstream

2019-02-02 Thread Andrew Gierth
> "Noah" == Noah Misch writes: >> I found it much simpler to strip out -Wdeclaration-after-statement >> instead: >> >> $(RYU_OBJS): override CFLAGS := $(filter-out >> -Wdeclaration-after-statement,$(CFLAGS)) Noah> The -Wno-declaration-after-statement approach takes eight lines Noah>

Re: Synchronize with imath upstream

2019-02-02 Thread Andrew Gierth
> "Noah" == Noah Misch writes: Noah> - # -Wdeclaration-after-statement isn't applicable for C++ Noah> + # -Wdeclaration-after-statement isn't applicable for C++. Specific C files Noah> + # disable it, so AC_SUBST the negative form. Noah> + PERMIT_DECLARATION_AFTER_STATEMENT= Noah>

Re: Synchronize with imath upstream

2019-02-03 Thread Noah Misch
On Sun, Feb 03, 2019 at 07:07:36AM +, Andrew Gierth wrote: > In that case I propose that we avoid the whole issue by removing > -Wdeclaration-after-statement entirely. Some folks who skip $SUBJECT will be interested in your proposal. If you wish to pursue that proposal, please start a new thr

Re: Synchronize with imath upstream

2019-02-03 Thread Tom Lane
Noah Misch writes: > The -Wno-declaration-after-statement approach takes eight lines of code, and > the filter-out approach takes one. On the other hand, using $(filter-out) > changes any runs of whitespace to single spaces ("$(filter-out foo,ab c)" > yields "a b c"). We do risk that with CP

Re: Synchronize with imath upstream

2019-02-03 Thread David Fetter
On Sun, Feb 03, 2019 at 07:07:36AM +, Andrew Gierth wrote: > > "Noah" == Noah Misch writes: > > >> I found it much simpler to strip out -Wdeclaration-after-statement > >> instead: > >> > >> $(RYU_OBJS): override CFLAGS := $(filter-out > -Wdeclaration-after-statement,$(CFLAGS)) > >

Re: Synchronize with imath upstream

2019-02-03 Thread Noah Misch
On Sun, Feb 03, 2019 at 10:31:26AM -0500, Tom Lane wrote: > Noah Misch writes: > > The -Wno-declaration-after-statement approach takes eight lines of code, and > > the filter-out approach takes one. On the other hand, using $(filter-out) > > changes any runs of whitespace to single spaces ("$(fil

Re: Synchronize with imath upstream

2019-02-06 Thread Alvaro Herrera
On 2019-Feb-03, David Fetter wrote: > On Sun, Feb 03, 2019 at 07:07:36AM +, Andrew Gierth wrote: > > > "Noah" == Noah Misch writes: > > So far, expressed opinions have run about 4:2 in favour of allowing > > mixed declarations and code. > > +1 for this. Just curious, why do you care?

Re: Synchronize with imath upstream

2019-02-06 Thread Andres Freund
On February 6, 2019 5:17:50 AM GMT+05:30, Alvaro Herrera wrote: >On 2019-Feb-03, David Fetter wrote: > >> On Sun, Feb 03, 2019 at 07:07:36AM +, Andrew Gierth wrote: >> > > "Noah" == Noah Misch writes: > >> > So far, expressed opinions have run about 4:2 in favour of allowing >> > mixe

Re: Synchronize with imath upstream

2019-02-06 Thread Tom Lane
Andres Freund writes: > On February 6, 2019 5:17:50 AM GMT+05:30, Alvaro Herrera > wrote: >> I'm -1 for this myself. I think there are a few places that could >> benefit from it, but my fear is that many *more* places would get >> worse. > Because of imported code like ryu and imath? And becau

Re: Synchronize with imath upstream

2019-02-06 Thread Andres Freund
Hi, On 2019-02-06 10:15:24 -0500, Tom Lane wrote: > Andres Freund writes: > > On February 6, 2019 5:17:50 AM GMT+05:30, Alvaro Herrera > > wrote: > >> I'm -1 for this myself. I think there are a few places that could > >> benefit from it, but my fear is that many *more* places would get > >> w

Re: Synchronize with imath upstream

2019-02-06 Thread Noah Misch
On Wed, Feb 06, 2019 at 10:15:24AM -0500, Tom Lane wrote: > Andres Freund writes: > > On February 6, 2019 5:17:50 AM GMT+05:30, Alvaro Herrera > > wrote: > >> I'm -1 for this myself. I think there are a few places that could > >> benefit from it, but my fear is that many *more* places would get

Re: Synchronize with imath upstream

2019-02-07 Thread Tom Lane
Noah Misch writes: > On Wed, Feb 06, 2019 at 10:15:24AM -0500, Tom Lane wrote: >> I don't object to keeping imported code in a form that matches upstream >> as best we can. (Should we also exclude such files from pgindent'ing?) > I think it depends on how much time one spends merging upstream ch

Re: Synchronize with imath upstream

2019-02-07 Thread Daniel Gustafsson
> On 7 Feb 2019, at 16:12, Tom Lane wrote: > .. I do strongly recommend setting up and documenting a > reproducible import process, as I did for src/timezone. Strong +1 on this. cheers ./daniel

Re: Synchronize with imath upstream

2019-02-07 Thread Michael Paquier
On Thu, Feb 07, 2019 at 09:23:43PM +0100, Daniel Gustafsson wrote: > On 7 Feb 2019, at 16:12, Tom Lane wrote: >> .. I do strongly recommend setting up and documenting a >> reproducible import process, as I did for src/timezone. > > Strong +1 on this. +1. -- Michael signature.asc Description: P

Re: Synchronize with imath upstream

2019-02-07 Thread Noah Misch
On Thu, Feb 07, 2019 at 10:12:05AM -0500, Tom Lane wrote: > Noah Misch writes: > > On Wed, Feb 06, 2019 at 10:15:24AM -0500, Tom Lane wrote: > >> I don't object to keeping imported code in a form that matches upstream > >> as best we can. (Should we also exclude such files from pgindent'ing?) >

Re: Synchronize with imath upstream

2019-02-07 Thread Tom Lane
Noah Misch writes: > On Thu, Feb 07, 2019 at 10:12:05AM -0500, Tom Lane wrote: >> I have no particular opinion on whether pgindent should be part of the >> mix for imath, but I do strongly recommend setting up and documenting a >> reproducible import process, as I did for src/timezone. > Good ide