From owner-svn-src-head@freebsd.org Tue Sep 17 16:21:03 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4DFF1289F5 for ; Tue, 17 Sep 2019 16:21:03 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46XpJH20Vdz4Cfw for ; Tue, 17 Sep 2019 16:21:03 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1568737261; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=Gc2RuZZRH7J5CLsbO+oyMax7PNHVYAa0se0Cj4RnqP/6tpjcSfrqZZFImRfhwKzpa2PetPPPAx6nt P5WD1af4u6mDpj77XgnJC4rihhLqwM4pjI2YD5DQqPGu5UmslkPBJqacjcKw4JgdxUs1pCThlUIJkK peZ3XyrjPpIdQzu7wmH7+NWJq38b8un6lyUCBJ0akFR8nF19+Eg2PnaoepsGo5mY/CiCBFoa9OjsfH ZwVCrwgPrKjhncD+noSQzB2nUKHsnurHiPLhiyicdhfLgyEHtV59oZK/V68fFY0sA3r4bnZarD8QRu sS6A6nGbNDdtgiQ1vv/+aSn5osDJPNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=RidBFvt1egsvG4iczwVRR+rQwzBd4Y2CJVwPGpoZJeI=; b=lGWDzEI4RjAy7TW0TpIM0AxDLmcsdoZdEz31sCzJtvPvIjlxitKohm1yA7CTfRSYezlgcEbJb0SlX MOXPhaPWGOPG3Fl5c+YyOTklodT7EwHCVRv1zzyhNebc+rX9kVLG8RPfvS4kBo8+VjmttDNH0upjbq UCXtSjH+eFrmE3TrObvKZ8irJi/15930p+FFI2N/nOuhHWvv5mNeshg6NukuysbaJPS2u4ziU2i1Ck hlxNrCAT+kEWpUT1Dio5LwX0qaDjlTtV29glNfI/ZchFG/8hlYhkwu5lzcQN0JlVwiwhjNPauKC1/T z6KPvp/9+4Lj6fNq6zaYTF689uftE4w== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=RidBFvt1egsvG4iczwVRR+rQwzBd4Y2CJVwPGpoZJeI=; b=VNzvE1ZVvvLo8RSwAR2ZFAFmWx+Qr88uAOG9pKYN7ZkxCIxOOQ2vZARvkU0kZP8s8Ab5veWzC4BQz jlHOL9hCxk35giTjZEis7LpL7bX8E1SS7LYsSbszcJNqveAym2FTE3rI/+Q2HtmWDMaduPJZPAqTvK xaJtNvz1bMhULpBgcFGvx4wvml+zirYGJq9exCq/fT+YWbtcxLI91MkV1gy23mmo67A9n89XCDIU8Y 028qtyY7D+ZYoUZ2T717zMMqW//GD32I50lIAoAgNu6BPQYBMH1bcLDqm2YEOF9R0zxhGIGNeg5yw7 jleiB/ixxhWD9LMG96Z8WRh+4uZkXjg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 222a285a-d967-11e9-85ed-13b9aae3a1d2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 222a285a-d967-11e9-85ed-13b9aae3a1d2; Tue, 17 Sep 2019 16:21:00 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x8HGKwS2099761; Tue, 17 Sep 2019 10:20:58 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r352451 - head/stand/libsa From: Ian Lepore To: Toomas Soome , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 17 Sep 2019 10:20:58 -0600 In-Reply-To: <201909171616.x8HGGlkb066218@repo.freebsd.org> References: <201909171616.x8HGGlkb066218@repo.freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46XpJH20Vdz4Cfw X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2019 16:21:03 -0000 On Tue, 2019-09-17 at 16:16 +0000, Toomas Soome wrote: > Author: tsoome > Date: Tue Sep 17 16:16:46 2019 > New Revision: 352451 > URL: https://svnweb.freebsd.org/changeset/base/352451 > > Log: > loader: revert r352421 > > As insisted by kib, malloc(0) is quite legal. > > Modified: > head/stand/libsa/zalloc_malloc.c > > Modified: head/stand/libsa/zalloc_malloc.c > ============================================================================== > --- head/stand/libsa/zalloc_malloc.c Tue Sep 17 15:53:40 2019 (r352450) > +++ head/stand/libsa/zalloc_malloc.c Tue Sep 17 16:16:46 2019 (r352451) > @@ -73,9 +73,6 @@ Malloc_align(size_t bytes, size_t alignment) > { > Guard *res; > > - if (bytes == 0) > - return (NULL); > - > #ifdef USEENDGUARD > bytes += MALLOCALIGN + 1; > #else For the record, you're both right. In both the C and posix standards for malloc(), an implementation is allowed to return either NULL or a unique pointer which cannot be used to access any memory but must be passed to free(). -- Ian