Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Nov 2019 11:30:27 +0100
From:      Antoine Brodin <antoine@freebsd.org>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   Re: svn commit: r354598 - in stable: 11/contrib/libc++/include 11/sys/sys 12/contrib/libc++/include 12/sys/sys
Message-ID:  <CAALwa8nL0CPterFYAEpyGzs8FOdJd20oXTusVEiEnKJVGd8Lqw@mail.gmail.com>
In-Reply-To: <4FEA5BCC-A9E7-4FDB-8392-04027239D9B0@FreeBSD.org>
References:  <201911101841.xAAIfEXV088995@repo.freebsd.org> <CAALwa8mBs0xdXPP4j=5NFTcJ1ALngtOcMChwXH5cV_rwntihpg@mail.gmail.com> <CAALwa8nqSo6hp70sRnDmjSgaWxLtJ-h94Hz41O=4P9AAe%2B%2BUvw@mail.gmail.com> <4FEA5BCC-A9E7-4FDB-8392-04027239D9B0@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 11, 2019 at 11:10 AM Dimitry Andric <dim@freebsd.org> wrote:
>
> On 11 Nov 2019, at 10:29, Antoine Brodin <antoine@freebsd.org> wrote:
> >
> > On Mon, Nov 11, 2019 at 9:03 AM Antoine Brodin <antoine@freebsd.org> wrote:
> >>
> >> On Sun, Nov 10, 2019 at 7:41 PM Dimitry Andric <dim@freebsd.org> wrote:
> >>>
> >>> Author: dim
> >>> Date: Sun Nov 10 18:41:13 2019
> >>> New Revision: 354598
> >>> URL: https://svnweb.freebsd.org/changeset/base/354598
> >>>
> >>> Log:
> >>>  MFC r354460:
> >>>
> >>>  Merge commit e8316372b from llvm git (by Louis Dionne):
> >>>
> >>>    [libc++] Add `__truncating_cast` for safely casting float types to
> >>>    integers
> >>>
> >>>    This is needed anytime we need to clamp an arbitrary floating point
> >>>    value to an integer type.
> >>>
> >>>    Thanks to Eric Fiselier for the patch.
> >>>
> >>>    Differential Revision: https://reviews.llvm.org/D66836
> >>>
> >>>    llvm-svn: 370891
> >>>
> >>>  Merge commit b92deded8 from llvm git (by Louis Dionne):
> >>>
> >>>    [libc++] Move __clamp_to_integral to <cmath>, and harden against
> >>>    min()/max() macros
> >>>
> >>>    llvm-svn: 370900
> >>>
> >>>  Merge commit 0ec6a4882 from llvm git (by Louis Dionne):
> >>>
> >>>    [libc++] Fix potential OOB in poisson_distribution
> >>>
> >>>    See details in the original Chromium bug report:
> >>>        https://bugs.chromium.org/p/chromium/issues/detail?id=994957
> >>>
> >>>  Together, these fix a security issue in libc++'s implementation of
> >>>  std::poisson_distribution, which can be exploited to read data which is
> >>>  out of bounds.
> >>>
> >>>  Note there are no programs in the FreeBSD base system that use
> >>>  std::poisson_distribution, so this is only a possible issue for ports
> >>>  and external programs which have been built against libc++.  Therefore,
> >>>  I am bumping __FreeBSD_version for the benefit of our port maintainers.
> >>>
> >>>  Requested by: emaste
> >>>  Security:     potential OOB read
> >>>
> >>> Modified:
> >>>  stable/11/contrib/libc++/include/cmath
> >>>  stable/11/contrib/libc++/include/random
> >>>  stable/11/sys/sys/param.h
> >>> Directory Properties:
> >>>  stable/11/   (props changed)
> >>>
> >>> Changes in other areas also in this revision:
> >>> Modified:
> >>>  stable/12/contrib/libc++/include/cmath
> >>>  stable/12/contrib/libc++/include/random
> >>>  stable/12/sys/sys/param.h
> >>> Directory Properties:
> >>>  stable/12/   (props changed)
> >>
> >> Hi,
> >>
> >> It seems that some recent changes to stable/11 are broken,  lots of
> >> ports now fail to build on stable/11.
> >
> > This affects stable/12 too.
> > It seems that the cmath header can't be compiled.
>
> Interesting, it works fine here on e.g. stable/12:
>
> $ cat test-cmath.cpp
> #include <cmath>
>
> $ c++ -c test-cmath.cpp
>
> Are there any build logs available showing errors?

For instance these logs:
http://gohan01.nyi.freebsd.org/data/12stable-i386-quarterly-baseline/517228/logs/errors/x265-3.1.2_2.log
http://gohan01.nyi.freebsd.org/data/12stable-i386-quarterly-baseline/517228/logs/errors/exiv2-0.27.1_2,1.log

/usr/include/c++/v1/cmath:622:68: error: too many arguments provided
to function-like macro invocation
  static_assert(is_same<_FloatT, float>::value || is_same<_FloatT,
double>::value
                                                                   ^
/usr/include/c++/v1/__config:873:13: note: macro 'static_assert' defined here
#    define static_assert(__b, __m) _Static_assert(__b, __m)
            ^

Antoine



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAALwa8nL0CPterFYAEpyGzs8FOdJd20oXTusVEiEnKJVGd8Lqw>