Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Feb 2018 14:57:07 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        Antoine Brodin <antoine@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org, re <re@freebsd.org>
Subject:   Re: svn commit: r328973 - in stable/11: include sys/sys
Message-ID:  <83191F81-4D50-4B7D-918D-963CC8A0F331@FreeBSD.org>
In-Reply-To: <c5654c7d-22cf-dc73-8b40-b2fa9ef7438d@selasky.org>
References:  <201802071506.w17F6s5l043163@repo.freebsd.org> <CAALwa8nxtiGHMNbMrS_51MvqWfsccV%2BZ-whdGp8VedFCWid5zQ@mail.gmail.com> <CAALwa8nam2SgGH6jqsVf-5-sdMPLb3d0DBxhhZgc1zBDP=5r3A@mail.gmail.com> <c5654c7d-22cf-dc73-8b40-b2fa9ef7438d@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On 11 Feb 2018, at 11:24, Hans Petter Selasky <hps@selasky.org> wrote:
> 
> On 02/11/18 11:09, Antoine Brodin wrote:
>> On Sun, Feb 11, 2018 at 8:01 AM, Antoine Brodin <antoine@freebsd.org> wrote:
>>> On Wed, Feb 7, 2018 at 4:06 PM, Hans Petter Selasky
>>> <hselasky@freebsd.org> wrote:
>>>> Author: hselasky
>>>> Date: Wed Feb  7 15:06:54 2018
>>>> New Revision: 328973
>>>> URL: https://svnweb.freebsd.org/changeset/base/328973
>>>> 
>>>> Log:
>>>>   MFC r328237:
>>>>   Use the __alloc_size2 attribute where relevant.
>>>> 
>>>>   This follows the documented use in GCC. It is basically only relevant for
>>>>   calloc(3), reallocarray(3) and  mallocarray(9).
>>>> 
>>>>   NOTE: Without this change clang 5.0.1 can produce incorrect optimisation
>>>>   code for static processing of data using the allocated object. For example
>>>>   this has been seen compiling the mlx4 core module, which allocates a
>>>>   fixed size array which is then sorted by a fixed order loop. The
>>>>   optimised result, -O2, is incorrect unless this patch is in place.
>>>> 
>>>>   Suggested by: Mark Millard
>>>>   Reference:    https://docs.freebsd.org/cgi/mid.cgi?9DE674C6-EAA3-4E8A-906F-446E74D82FC4
>>>> 
>>>> Modified:
>>>>   stable/11/include/stdlib.h
>>>>   stable/11/sys/sys/malloc.h
>>>> Directory Properties:
>>>>   stable/11/   (props changed)
>>> 
>>> Hi,
>>> 
>>> Please revert this change.  Lots of ports that used to build fine on
>>> stable/11 are now failing.
>>> /usr/include/stdlib.h:93:7: error: expected function body after
>>> function declarator
>>>              __alloc_size2(1, 2);
> 
> Hi Antoine,
> 
> I'm sorry for the inconvenience. Probably I should have sent this patch for portmgr first, to avoid such breakage. This patch is required also for ports, and it is good you are now rebuilding ports which use this define, because they might be broken due to the fact the __alloc_size2() was incorrectly implemented!
> 
> I hope this will be the end of the breakage:
> 
> https://svnweb.freebsd.org/changeset/base/329122

Hmm, so you add something to the lint path, and that suddenly fixes the builds?  How is that possible?  Are all these ports compiled in "lint mode"?

-Dimitry


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWoBLswAKCRCwXqMKLiCW
o5RBAKDwFd8KBmE6f2Cydy8fFusUEwnHcACgwpPteMH/XmpJHZzOfNPHJxIX14s=
=uP8l
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?83191F81-4D50-4B7D-918D-963CC8A0F331>