From owner-svn-src-all@FreeBSD.ORG Fri May 11 18:10:49 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7FDD106564A; Fri, 11 May 2012 18:10:49 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 45FF08FC14; Fri, 11 May 2012 18:10:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id q4BIAl9B021829; Fri, 11 May 2012 22:10:47 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id q4BIAlrW021828; Fri, 11 May 2012 22:10:47 +0400 (MSK) (envelope-from ache) Date: Fri, 11 May 2012 22:10:47 +0400 From: Andrey Chernov To: Garrett Cooper Message-ID: <20120511181047.GA21793@vniz.net> Mail-Followup-To: Andrey Chernov , Garrett Cooper , Konstantin Belousov , Konstantin Belousov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201205111129.q4BBT85G081093@svn.freebsd.org> <20120511145432.GA19173@vniz.net> <20120511170412.GR2358@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Konstantin Belousov , svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Konstantin Belousov Subject: Re: svn commit: r235266 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 11 May 2012 18:10:49 -0000 On Fri, May 11, 2012 at 10:55:39AM -0700, Garrett Cooper wrote: > On Fri, May 11, 2012 at 10:04 AM, Konstantin Belousov > wrote: > > On Fri, May 11, 2012 at 06:54:32PM +0400, Andrey Chernov wrote: > >> Thanks, but in this two places old errno value should be saved across > >> free() because free() may damage it: > > I do not agree. free() cannot change errno. > > It might depending on the OS (logically it shouldn't, but I > digress), but there was some recent discussion on the POSIX list about > errno not being mangled via free: > http://austingroupbugs.net/view.php?id=385 . Yes. The initial paragraph from it states pretty clear: Line 25639 [XSH errno] is explicit that "The setting of errno after a successful call to a function is unspecified unless the description of that function specifies that errno shall not be modified." However, free() does not mention its interaction with errno. -- http://ache.vniz.net/