Date: Tue, 5 Jun 2012 16:25:10 +0200 From: Joerg Sonnenberger <joerg@britannica.bec.de> To: svn-src-all@freebsd.org Cc: svn-src-head@FreeBSD.ORG, Dimitry Andric <dim@FreeBSD.ORG>, src-committers@FreeBSD.ORG, Andrey Chernov <ache@freebsd.org> Subject: Re: svn commit: r236582 - head/lib/libc/stdlib Message-ID: <20120605142510.GB13416@britannica.bec.de> In-Reply-To: <20120605131305.GF13306@vniz.net> References: <201206042134.q54LYoVJ067685@svn.freebsd.org> <4FCDBE69.6080906@FreeBSD.org> <20120605123901.GA13306@vniz.net> <20120605125520.GA12045@britannica.bec.de> <20120605131305.GF13306@vniz.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120605142510.GB13416>