From owner-svn-src-head@FreeBSD.ORG Tue Jun 5 14:25:30 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C00B106564A; Tue, 5 Jun 2012 14:25:30 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from mo6-p00-ob.rzone.de (mo6-p00-ob.rzone.de [IPv6:2a01:238:20a:202:5300::1]) by mx1.freebsd.org (Postfix) with ESMTP id 38DFE8FC12; Tue, 5 Jun 2012 14:25:29 +0000 (UTC) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/avgusCdvwXOZ/NA7x/bvTm77YCcfSPAeCHFXjMjf+Y6twMjxoXA= X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de ([2001:6f8:13f0:31f:94ff:fbf7:8e6a:dc1b]) by smtp.strato.de (josoe mo46) (RZmta 29.10 AUTH) with (AES128-SHA encrypted) ESMTPA id D0258do55DMrk3 ; Tue, 5 Jun 2012 16:25:21 +0200 (CEST) Received: by britannica.bec.de (sSMTP sendmail emulation); Tue, 05 Jun 2012 16:25:10 +0200 Date: Tue, 5 Jun 2012 16:25:10 +0200 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20120605142510.GB13416@britannica.bec.de> References: <201206042134.q54LYoVJ067685@svn.freebsd.org> <4FCDBE69.6080906@FreeBSD.org> <20120605123901.GA13306@vniz.net> <20120605125520.GA12045@britannica.bec.de> <20120605131305.GF13306@vniz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120605131305.GF13306@vniz.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.ORG, Dimitry Andric , src-committers@FreeBSD.ORG, Andrey Chernov Subject: Re: svn commit: r236582 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Jun 2012 14:25:30 -0000 On Tue, Jun 05, 2012 at 05:13:05PM +0400, Andrey Chernov wrote: > On Tue, Jun 05, 2012 at 02:55:20PM +0200, Joerg Sonnenberger wrote: > > On Tue, Jun 05, 2012 at 04:39:01PM +0400, Andrey Chernov wrote: > > > Moreover, standard metion "unsuccessful call" case for free() where errno > > > state is totally undefined. > > > > ...which would be a programming mistake in first place and is valid as > > justification. > > Not only that (I mean programming mistake in the realpath). F.e. internal > free/malloc state can be damaged by other code even earlier. But all of > this is not the case, since POSIX allows it to modify errno on _success_, > which is main reason of the change. > Please see > http://austingroupbugs.net/view.php?id=385 That is about explicitly recognizing how stupid the notion of free(3) not preserving errno is. Seriously, before you start to randomly bloat code all over the place, restricting the behavior of free(3) to be sensible is a much saner option. Joerg