Re: pgsql: Fix configure's snprintf test so it exposes HP-UX bug.

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix configure's snprintf test so it exposes HP-UX bug.
Date: 2018-08-24 05:48:24
Message-ID: 20180824054824.o6sc6jhcbfnwdk4o@alap3.anarazel.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2018-08-17 14:38:41 +0000, Tom Lane wrote:
> Fix configure's snprintf test so it exposes HP-UX bug.
>
> Since commit e1d19c902, buildfarm member gharial has been failing with
> symptoms indicating that snprintf sometimes returns -1 for buffer
> overrun, even though it passes the added configure check. Some
> google research suggests that this happens only in limited cases,
> such as when the overrun happens partway through a %d item. Adjust
> the configure check to exercise it that way. Since I'm now feeling
> more paranoid than I was before, also make the test explicitly verify
> that the buffer doesn't get physically overrun.
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/9bed827b18cc4f27fb7cd7c02ad301519eca6d29
>
> Modified Files
> --------------
> config/c-library.m4 | 11 ++++++++---
> configure | 9 ++++++---
> 2 files changed, 14 insertions(+), 6 deletions(-)

Afaictl this does not seem to have done the trick, gharial is still red?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-08-24 13:31:43 Re: pgsql: Fix configure's snprintf test so it exposes HP-UX bug.
Previous Message Andres Freund 2018-08-24 01:41:19 pgsql: Require C99 (and thus MSCV 2013 upwards).