Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jun 2012 17:35:08 +0400
From:      Andrey Chernov <ache@FreeBSD.ORG>
To:        Dag-Erling Sm??rgrav <des@des.no>
Cc:        svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Pawel Jakub Dawidek <pjd@FreeBSD.ORG>, freebsd-arch@FreeBSD.ORG
Subject:   Re: svn commit: r236582 - head/lib/libc/stdlib
Message-ID:  <20120605133508.GA14460@vniz.net>
In-Reply-To: <86txypvr9t.fsf@ds4.des.no>
References:  <201206042134.q54LYoVJ067685@svn.freebsd.org> <20120605074741.GA1391@garage.freebsd.pl> <86txypvr9t.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 05, 2012 at 03:10:06PM +0200, Dag-Erling Sm??rgrav wrote:
> Pawel Jakub Dawidek <pjd@FreeBSD.org> writes:
> > Very interesting. However free(3) is always successful. Maybe we need
> > more context here, but the sentence above might talk about functions
> > that can either succeed or fail and such functions do set errno on
> > failure, but we don't know what they do to errno on success - they
> > sometimes interact with the errno, free(3) never does.
> 
> Even if free() itself never fails, it might have side effects such as
> unmapping a slab, logging a KTR event etc. which can modify errno.

I totally agree. Even if our free() will be cleaned in this sense or save 
errno internally, we need the code which not relays on some particular 
implementation but works in general scope with any standard-conformant 
free().

-- 
http://ache.vniz.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120605133508.GA14460>