From owner-freebsd-current@freebsd.org Tue Jul 5 20:55:14 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEFADB721A7 for ; Tue, 5 Jul 2016 20:55:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm6.bullet.mail.bf1.yahoo.com (nm6.bullet.mail.bf1.yahoo.com [98.139.212.165]) (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 814D614EA for ; Tue, 5 Jul 2016 20:55:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1467752106; bh=NeF2+i0TMZMOaeUTFIAPh52HvWKxH8q9yC6iASaJcNY=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=P5lVBHeVxJsrDNdlfm+SF0I6VwgBTBlwF1s3bJuFEWYfZFnA4pxk9OKg3VqL8lGwCZDtHoIYJKWGL/BBNF8qthiE3zkotnKp74gmpICFWyoMEJtF+nu6ComgCCTWYiL7FbQS713gErXyChugMFzcuWcUAytzdlLdM0xriRuVBKSJ4TAezbX0+/N1bc7mwgkMfs9O40uXsZJL1oFujd9xeb0isbWUrTlJ1yiPDXx5gs5uVhV3AJr00US0T0ptLgIIAvVMXH7cRjH25y4ZDweMOkL7nY096N6MvCf6B6+2GeQYav7mWMHca+GfYe2US2yGf9EY5V0Su3rq8+QouBojTg== Received: from [98.139.215.143] by nm6.bullet.mail.bf1.yahoo.com with NNFMP; 05 Jul 2016 20:55:06 -0000 Received: from [98.139.211.202] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 05 Jul 2016 20:55:06 -0000 Received: from [127.0.0.1] by smtp211.mail.bf1.yahoo.com with NNFMP; 05 Jul 2016 20:55:06 -0000 X-Yahoo-Newman-Id: 931933.33492.bm@smtp211.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: aMHt8Q0VM1lOUqmg4iA7lKixuBvxBdEFRq.3sbdcoByYO9L DjgrxBm1Ip7sIy9Ba739ho9WL8CWmEkCRlUJbpcuCxM3Tn1v3abG1JxxEA6W TmOFNSfK980iJ4QMi03d2_AImYmHw_2Ewt63CMtZ4GOyqXdU3cihZLxpLeBy BcdbHRfkeCn4YrAYw5HFZD3QUdNRnCBc8NaNDRcOHP4iLVUZWH.89_meo4NT a8E94GmiELqd3aQu1fE0zXCaLMrGaie33xUwFyb6qGA.CCfOqsCthSHDuD7B 0SYzzVEQaFMVIbWqiqRg2rNvcdA4iyLyFX9IGhGDPj6_7YvCpYyZXgJx4K4a k3vCn0uWYe259kKPaek8yeK7dUj3SNqqFBE43XfwOMGNV6AWow3YGaPciRzf zUgV3W5CRxH9fkzYz5N0XRivWUwzTCQA9udXCwdtylE5BbXSOF8toukLHVkV jxskpyQ__CYEYSSZ4D6.hhnnQF1_IkBYhKAxtyaF1bfCYP4aGjCckP4aBRsq Hk0Xg4ojvQH6njRa7xz6yymPpZQNIOrUHsddJts1cgP6dQg-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: clang 3.3/3.4 fails to build items that use stdlib.h because of __alloc_size attribute assigned to posix_memalign To: cem@freebsd.org, "Ngie Cooper (yaneurabeya)" References: <838A69F7-343D-4398-928B-E54FB966B574@gmail.com> <3a288119-81f5-9199-b9d4-0f4649a7b8eb@FreeBSD.org> Cc: Dimitry Andric , Roman Divacky , FreeBSD current From: Pedro Giffuni Message-ID: <647ae486-0639-715e-4fc2-28590295f816@FreeBSD.org> Date: Tue, 5 Jul 2016 15:55:12 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <3a288119-81f5-9199-b9d4-0f4649a7b8eb@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2016 20:55:14 -0000 Answering to myself .... On 07/05/16 15:24, Pedro Giffuni wrote: > Hmm ... > > On 07/05/16 15:14, Conrad Meyer wrote: >> Whoops, missed reply-all the first time. >> >> It seems pretty clear that alloc_size (return value is a memory >> allocation of size from parameter N) does not apply to posix_memalign, >> because posix_memalign's allocation is stored via a pointer argument >> rather than return value. >> >> https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes >> >> >> IMO the attribute should be removed from posix_memalign in stdlib.h >> >> Best, >> Conrad >> > > - I am wondering why it hasn't affected -current if it is wrong. Because newer clang removed alloc_size altogether. > - I am also wondering if we shouldn't just get rid of the attribute. > Nah, it is basically meant for FORTIFY_SOURCE, which is not being worked on anymore but maybe handy some day. > I will answer to myself those doubts and fix the issue. Thanks! > So, yes, we should remove it from posix_memalign(). I'll ask re@. Pedro.