From owner-svn-src-stable-11@freebsd.org Sun Feb 11 10:09:44 2018 Return-Path: Delivered-To: svn-src-stable-11@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 F1799F081BE; Sun, 11 Feb 2018 10:09:43 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A52170309; Sun, 11 Feb 2018 10:09:43 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-it0-x234.google.com with SMTP id n206so3335919itg.1; Sun, 11 Feb 2018 02:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=qlrQqiGgbrAk49RKqRFIdrQKPK4Z511TtS/XGZkjhBg=; b=EgHlkEtUZzQY+HPBX4YMP55SSY8UFdB9ub3eHbc2fb0W+2iuLujL0OI5D7BqHAoEB3 c0tfjCRTifNJshLs+CxkPvStCNYfF9KX+koN6uhfX7aZRxXj32ehx+L7DBYPnqAJfV7S vXWgpvwhzcAHfz9+C7JSHRREVbNCAj3j3iip0or7HgPgspYCMR/rgJJZEoYG5YcmHnrf ubqwyLtQn0Ac5Qd9dwg2p5kd0DJyIr5nu8PAJXvWfBOSUS4/i4/GqgNGKrYkFCzlNczH XQ3iuEWfTDZa8f4BqgfAo3wGMKxGJByMV49ABAwms6FI6qEyJQBrlmsti5vIQLmsPS+f WPUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=qlrQqiGgbrAk49RKqRFIdrQKPK4Z511TtS/XGZkjhBg=; b=gBvEhkkioX/I4a5ZKcq6dU0icK41JSvoeDPWgj4Zuv3yzSLfjse8hlfLmJgTHFa5E8 /Svoq8nuRKT5b3rK9lGLQLA9nzxdSYSgcZm7jyfgKPMHOTQVvRbuFN5nh2NWc+iRm8Bn PirSQV9H74sz/+kwExMKKjRHCDX6Qjk0ky3co4RCrgQtBaCo+o7Y7gsWH6v1XJ51G1U5 2KG2xCdZ9c8zdujqQWpgmHiZfcjxOsSN13hyLL4ZVHoWYhurSt58YHgT/y/rMy/+zx5H ANzwbIdHTf9LYhsuAeyVtbQDMbwGw+34ni7FsoHW1ldo3JTzoEAKaX5dn9hT1XJwdx/p oOUA== X-Gm-Message-State: APf1xPDD3pSEyB/zQQsD3RQPwwPWNNmxdqaXVxCTFVamt0bVoio2BBMq obC75QXwJvUDD+0uivUL4G4ULep/ZhMaNVN47Qbf/LEP X-Google-Smtp-Source: AH8x225drczXBeXWG/pV91A3b0tuf4gJ3UkgDLgB2ng2Ypj20ZigVME+Pa9HSC5LvXQ3A8REtzRZCfHU6auWPM0b+hU= X-Received: by 10.36.58.14 with SMTP id m14mr1413186itm.45.1518343782737; Sun, 11 Feb 2018 02:09:42 -0800 (PST) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 10.107.143.86 with HTTP; Sun, 11 Feb 2018 02:09:42 -0800 (PST) In-Reply-To: References: <201802071506.w17F6s5l043163@repo.freebsd.org> From: Antoine Brodin Date: Sun, 11 Feb 2018 11:09:42 +0100 X-Google-Sender-Auth: X0a6jQ7qBxIYpLEE-xkoourJbAY Message-ID: Subject: Re: svn commit: r328973 - in stable/11: include sys/sys To: Hans Petter Selasky Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org, re Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Feb 2018 10:09:44 -0000 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); Something like this may be needed on stable/11: Index: 11/sys/sys/cdefs.h =================================================================== --- 11/sys/sys/cdefs.h (revision 329121) +++ 11/sys/sys/cdefs.h (working copy) @@ -213,6 +213,7 @@ #define __aligned(x) #define __alloc_align(x) #define __alloc_size(x) +#define __alloc_size2(n, x) #define __section(x) #define __weak_symbol #else Antoine