From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2603 Path: news.gmane.org!not-for-mail From: Rob Landley Newsgroups: gmane.linux.lib.musl.general Subject: Re: malloc(0) behaviour Date: Tue, 15 Jan 2013 06:53:52 -0600 Message-ID: <1358254432.32505.26@driftwood> References: <20130114180533.GP20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1358254450 18603 80.91.229.3 (15 Jan 2013 12:54:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2013 12:54:10 +0000 (UTC) Cc: musl@lists.openwall.com To: musl@lists.openwall.com Original-X-From: musl-return-2604-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 15 13:54:28 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Tv628-0005g4-3T for gllmg-musl@plane.gmane.org; Tue, 15 Jan 2013 13:54:28 +0100 Original-Received: (qmail 3259 invoked by uid 550); 15 Jan 2013 12:54:11 -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 3251 invoked from network); 15 Jan 2013 12:54:11 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:subject:to:cc:references:in-reply-to:x-mailer :message-id:mime-version:content-type:content-disposition :content-transfer-encoding:x-gm-message-state; bh=oRKOJLCVrrIEdxYN1RHcCfUDgQkbxlAG1QMh5/MQsKU=; b=HQHUE0E18aVKTPK4Z2YEEfg7ZeK9bo33Svxtx4GpE8M1Q00b3kPynn9g/PqG0gffzn +rJu26Gps8Wf+R3r1z8obR6YmeajtSooZh2eK62TdV82lAlvbZrqiuVQhWv/dwA2ZrzG 21uGuPhlmUtulsc04TGOzKzvFPcXlblpp94mxKjwZ+UtXQTTSKhIikFuDPF8N3JCjEo6 L59Q3QCfm7jiNa2NDMn+BN45b5cIbbV+X82RvotzooBwGy0D9rTGTHRAwhkjbVjZWSHo 6Tglkdf2IHH8iNqg+mEaNLmPVcOgFXDYEzigfV8xFyP3+yJGiJnQHjUCpfsHPtiapmYk 5IXw== X-Received: by 10.60.169.76 with SMTP id ac12mr54155489oec.137.1358254439187; Tue, 15 Jan 2013 04:53:59 -0800 (PST) In-Reply-To: (from igmar@palsenberg.com on Tue Jan 15 02:32:55 2013) X-Mailer: Balsa 2.4.11 Content-Disposition: inline X-Gm-Message-State: ALoCoQmEpcdDdGHYerUiEP8CyrBa6Iz6KhD0lmF9y/2lZBpQ6bhGM6mwtLC+Xo+FScPFY/voFoat Xref: news.gmane.org gmane.linux.lib.musl.general:2603 Archived-At: On 01/15/2013 02:32:55 AM, Igmar Palsenberg wrote: > > On 14/01/2013, Rich Felker wrote: > > Another: Null means allocation failure. As malloc ought to never =20 > fail > > to find zero bytes free, it thus makes sense to return a non-null > > pointer. >=20 > A valid pointer also means you should be able to store something. Says who? Fire up the mmap() man page and look at PROT_NONE. Rob=