From owner-svn-src-all@freebsd.org Wed Sep 18 11:59:04 2019 Return-Path: Delivered-To: svn-src-all@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 B1742FB375 for ; Wed, 18 Sep 2019 11:59:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46YJRW5sPCz4DW5 for ; Wed, 18 Sep 2019 11:59:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x831.google.com with SMTP id c3so8454451qtv.10 for ; Wed, 18 Sep 2019 04:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XL9ELMHmimsD/QqzRRaugiKqyv4hryLcwg9DlRwDPbA=; b=1y4GU9sKFcWxiSEyRLy+p6zftzcOYHIUHdN0dHW69qCNLtcm/iH5/PPQjSFLXacj3w yOr2IT2jexhEcuAHyZOrotja2Anyma+QPgFUuSicbkedNBpzkLFkKXX7Tj/goPAZ7QQJ UaxfOTmuRkx3zJTRXPs7p2S7cuRwUbdsx0fofI/M/8QkEEKQN8/mkh0078VojHdM8g9b VEho30/UGBB/83zerkuUaTj2W8v9OkNE9SDrisE2fR5XHQ0EaD+0gCLtiCtfAG6bJObU J/LmSDYvSm2qn8DBezLS4zUDOByciuHG6xBNze81ceRfGHkqg7pYjkas8qMyU3Afrx8p AWpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XL9ELMHmimsD/QqzRRaugiKqyv4hryLcwg9DlRwDPbA=; b=ayNOubXLEsMEp0q+n5I+fWHR625FaFxDVm9wf9q1vri4OgBgWdYL/PyARI3Rn1Ip1M 5Vg/THxjxeqar+b2WW7LuOU7f3AOsZ1QQv9TETlscXpWyafd5JaTleHd7+BYYCxKG5kZ QxUcB5aD+cuKwaJbknBRqMhANl+kccZkOa6KmMolhfmPYVwCw8RsyRpAJdqqHpJxahdy uPv0yGZbvOHLoJkbnz9AXpiLWbexoCZTxtcBUU19f3fPXyWvFixpT1hiY2Jl8dWZeXls RmdFhwVGQt4n0oLVeCsakIHonpkXlc0i1+JPbwTt7w+om1b1H8vPJwecxzZlSmiNLL9G sE7A== X-Gm-Message-State: APjAAAUiQhL1WWuRCNV8yP+kcEjORnHpyh/Ypaq20y3v3LNjgWpmMBia TlS2NlqijWbS8F+JlKh+Prarw4QOC0xikZnGjSPRFQ== X-Google-Smtp-Source: APXvYqzH5tnewJr2ckSfKkBGjxxZrRHF4lQzTDu867ShZE11DyL/+PVBFZHCoKWViSUVQT+kOeI98uRHquAo1DdH+48= X-Received: by 2002:ac8:44c9:: with SMTP id b9mr3620893qto.175.1568807942530; Wed, 18 Sep 2019 04:59:02 -0700 (PDT) MIME-Version: 1.0 References: <201909171616.x8HGGlkb066218@repo.freebsd.org> <347a71f4-bbad-0d39-9e75-0564d06d7a1e@selasky.org> In-Reply-To: <347a71f4-bbad-0d39-9e75-0564d06d7a1e@selasky.org> From: Warner Losh Date: Wed, 18 Sep 2019 12:58:33 +0100 Message-ID: Subject: Re: svn commit: r352451 - head/stand/libsa To: Hans Petter Selasky Cc: "Conrad E. Meyer" , Toomas Soome , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 46YJRW5sPCz4DW5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=1y4GU9sK; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::831) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.86 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[1.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.86)[ip: (-9.33), ipnet: 2607:f8b0::/32(-2.68), asn: 15169(-2.23), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Sep 2019 11:59:04 -0000 On Wed, Sep 18, 2019, 9:44 AM Hans Petter Selasky wrote: > On 2019-09-18 10:37, Warner Losh wrote: > > On Wed, Sep 18, 2019, 12:18 AM Conrad Meyer wrote: > > > >> Well, hang on; it's also perfectly legal for a malloc implementation > >> to return NULL for requests of zero bytes. You can access exactly the > >> number of bytes requested in the allocation; and free(NULL) works as > >> expected. NULL (0) is also aligned to any size you could want. > >> > > > > Legal, yes. But it is different than all the other FreeBSD environments, > > so the loader becomes the odd man out. This restores the consistency. > > > > Hi, > > The problem is the code that use malloc() that take NULL as a failure, > even if the size is zero :-) > > array = malloc(n * sizeof(q)); > if (array == NULL) > goto failure; > Such code isn't portable... Warner --HPS > >