From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9102 Path: news.gmane.org!not-for-mail From: Alexander Cherepanov Newsgroups: gmane.linux.lib.musl.general Subject: Re: string word-at-a-time and atomic.h FAQ on twitter Date: Wed, 13 Jan 2016 00:09:56 +0300 Message-ID: <56956BA4.9050402@openwall.com> References: <20160105164640.GL23362@port70.net> <569569F9.5010608@openwall.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1452633011 12832 80.91.229.3 (12 Jan 2016 21:10:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Jan 2016 21:10:11 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9115-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 12 22:10:11 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aJ6Cg-0006EJ-DZ for gllmg-musl@m.gmane.org; Tue, 12 Jan 2016 22:10:10 +0100 Original-Received: (qmail 23684 invoked by uid 550); 12 Jan 2016 21:10:08 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 23666 invoked from network); 12 Jan 2016 21:10:08 -0000 In-Reply-To: <569569F9.5010608@openwall.com> Xref: news.gmane.org gmane.linux.lib.musl.general:9102 Archived-At: On 2016-01-13 00:02, Alexander Cherepanov wrote: > On 2016-01-05 19:46, Szabolcs Nagy wrote: >> i think compiler attributes should be used here on compilers that >> might break the code, but there is no attribute for this kind of >> oob access yet (although may_alias attribute is missing here too >> and should be added like in other string functions). > > Perhaps the noclone function attribute could be used in the meantime? > > https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-g_t_0040code_007bnoclone_007d-function-attribute-3205 Probably together with the noinline attribute... Another attribute which looks relevant is no_sanitize_address. https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-g_t_0040code_007bno_005fsanitize_005faddress_007d-function-attribute-3199 -- Alexander Cherepanov