From owner-svn-src-stable@freebsd.org Sun Feb 11 16:54:47 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92F86F04EE3 for ; Sun, 11 Feb 2018 16:54:47 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic306-35.consmr.mail.ne1.yahoo.com (sonic306-35.consmr.mail.ne1.yahoo.com [66.163.189.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28050807A3 for ; Sun, 11 Feb 2018 16:54:47 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1518368086; bh=WtDuCuHH7EPhguGbusEbHD1Sp6M3vzSHsINTlFSePJ8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=KyjMMklJ33c+2jQRjtJUnJn8mPFhc0yVsQ82HvFkBXSXER7XTpbpcqUvPpjP3ubfZSOy/9dBaWDaSwNrezAWQiAblEg2otMSNXhEGMaTQPtgdFjZ+jf8K7/9c/SqbaqPz4z7Ai0d7pYFTd4ONGRpdjtxi9MDACsC7FU1g1tJVEQmAW+Le61nIdCnCsTuph/FnBR8ZHZPyCiheDjWsJPxkDCPcZcaBHgT/cA8Y2IFJjgtBgO+nrjNgrd0io7vfVIRgkBIL2dnIwXOLrM27VOH/0FfG8LmTrVtbfeMuFv10OLgBoiEhwDKU8pv75CeG//cjVhhNSUmAhyfnodpL41RAg== X-YMail-OSG: 8pPWtHgVM1lP5hSHImNzSlgBS79d__1dFprm7Igv9GXZpwwm9QfsPhNo7sWon_L cQx9QNjillhtC9fNgI_S.R3.F95w3jsAGPMhVkAxHn2vrNcnLA7.gnPCrvuRTaJ0IW7j740X8dRf Z1_yfVplyAJto9tgaVS4xzNRoVnRwfQ6dz7chMEFLMfFsRRvYaDJsBp97RY_10QkkpHX76b.1D6I cKL8kKv.PdkxwK3Q7qtwEd6updrUnHuV39kj3Fw0KJPj6jdnK4bfCkrbfkVQekxqpgne0JgB.fy3 o.c1F901hfnj1n56JYbKEQZyGAVdHitMKjbvetCqbI4qhBJQGgokpU.zUEw_FUbmdESG8WyeXxEf e01IJfa9LPEpDOs22o66.1aJzP4vGxiIinCYG2HStzmW6Nvr8Udcj8OgnuFKaDhP3xcKbWlzAfwi pXaRbBYP6JQjQJYbf9ncRmGDz9cD2kUaXc7RkX6d7yB5Gu.lbiPmPCAGyFYE0p7Sm.6h0R0s5uUh wFnKF_TM6Kg-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Sun, 11 Feb 2018 16:54:46 +0000 Received: from smtp230.mail.ne1.yahoo.com (EHLO [192.168.0.8]) ([10.218.253.211]) by smtp409.mail.ne1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID b87cb78e870cdc10322a74f0b8f86ff3; Sun, 11 Feb 2018 16:54:45 +0000 (UTC) Subject: Re: svn commit: r328973 - in stable/11: include sys/sys To: Hans Petter Selasky , Antoine Brodin Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org, re References: <201802071506.w17F6s5l043163@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: <28983217-7cbf-6ef8-8197-de122af9bf6f@FreeBSD.org> Date: Sun, 11 Feb 2018 11:54:44 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Feb 2018 16:54:47 -0000 ... On 11/02/2018 05:24, Hans Petter Selasky wrote: > On 02/11/18 11:09, Antoine Brodin wrote: >> On Sun, Feb 11, 2018 at 8:01 AM, Antoine Brodin >> wrote: >>> On Wed, Feb 7, 2018 at 4:06 PM, Hans Petter Selasky >>> 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 > > Else I will revert both patches and have you test them first. > > --HPS > While the lint mode definition was missing, I didn't merge the attribute uses (r328237) on purpose as I knew they could bring issues. Some rather broken ports like to take the standard headers and "fix" them. In essence, any port that requires an attribute defined in sys/cdefs.h is doing something wrong. The most notable offender was GCC but I think that was fixed: in any case, the last time I merged an attribute change I had to wait for the next release to start using it. Cheers, Pedro.