From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9103 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy 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:07:39 +0100 Message-ID: <20160112230738.GD13558@port70.net> References: <20160105164640.GL23362@port70.net> <569569F9.5010608@openwall.com> <56956BA4.9050402@openwall.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1452640081 25052 80.91.229.3 (12 Jan 2016 23:08:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Jan 2016 23:08:01 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9116-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 13 00:07:56 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 1aJ82a-0005AB-TR for gllmg-musl@m.gmane.org; Wed, 13 Jan 2016 00:07:53 +0100 Original-Received: (qmail 26550 invoked by uid 550); 12 Jan 2016 23:07:51 -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 26532 invoked from network); 12 Jan 2016 23:07:50 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <56956BA4.9050402@openwall.com> User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:9103 Archived-At: * Alexander Cherepanov [2016-01-13 00:09:56 +0300]: > 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 > i think a no-lto attr should be used, maybe noinline can achieve that. no-instrumentation attrs are ugly because new instrumentations may appear in new compilers and then your code becomes decorated. (libc does not work with asan instrumentation anyway without serious changes and asan runtime implementation inside the libc)