From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6923 Path: news.gmane.org!not-for-mail From: Josiah Worcester Newsgroups: gmane.linux.lib.musl.general Subject: Re: thoughts on reallocarray, explicit_bzero? Date: Wed, 28 Jan 2015 17:02:30 -0600 Message-ID: References: <20140519153130.GA519@muslin> <20140519161654.GO507@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1422486165 28203 80.91.229.3 (28 Jan 2015 23:02:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2015 23:02:45 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6936-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jan 29 00:02:45 2015 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 1YGbdE-0005Gy-Jh for gllmg-musl@m.gmane.org; Thu, 29 Jan 2015 00:02:44 +0100 Original-Received: (qmail 15998 invoked by uid 550); 28 Jan 2015 23:02:42 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15974 invoked from network); 28 Jan 2015 23:02:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=2ONtQRfcc0NxvTg1eSYuMVttdZ6HaRmdO+8bzE3EyBI=; b=bcf9xfJcbpyPj1c6fARCl8b3754rYcNb9xCjppxu15cK8HVn4dc4MZKe75wDbthdo8 kiK/aP3HU+rh14RsPHXBXrTR0QZN0GgSnpZlftru1R3q0O2ih1Sm9nJKg8TDEwx5qVwR e+SCBhqcfacEhcHdnecy8II2lmx1lgrv8Ew7dUKR271YVAtMeVwTUmclTiiURY0VV1nD I+UFSlNbWcKt+UzZ9WZDvaL8ofu6Lfp2kgGWhZG6B2palnbnyvIefPCaWHvglQvLC6pr R/Qn9HDD7+GzMAY5mx0lOj8jQeuwD3c/ykrrrfvxMaMIcTCwo8tHxf3iHFO/MT12uCOU 7cHQ== X-Received: by 10.182.73.131 with SMTP id l3mr3723953obv.45.1422486150097; Wed, 28 Jan 2015 15:02:30 -0800 (PST) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:6923 Archived-At: On Wed, Jan 28, 2015 at 4:54 PM, Daniel Cegie=C5=82ka wrote: > 2015-01-28 23:38 GMT+01:00 Nathan McSween : >> How can a compiler optimize out a memory barrier? > > The problem is not whether to do it or not, but in the fact that the > right solution is to use memset_s(). > > http://en.wikichip.org/wiki/c/c11#Bounds-checking_interfaces_annex_.28Ann= ex_K.29 memset_s inherits the typical Annex K brain damage which makes it not at all library safe or sane to use, though.