On Fri, May 11, 2012 at 10:55:39AM -0700, Garrett Cooper wrote:
> On Fri, May 11, 2012 at 10:04 AM, Konstantin Belousov
> <kostik...@gmail.com> 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/
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to