Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/stdlib



			Hi,

On 07/16/15 02:04, Kamil Rytarowski wrote:
> Module Name:	src
> Committed By:	kamil
> Date:		Thu Jul 16 00:04:00 UTC 2015
> 
> Modified Files:
> 	src/lib/libc/stdlib: reallocarr.c
> 
> Log Message:
> Reorder memcpy(3) and save errno
> 
> This chang is for safety as memcpy(3) might change it.

I am not against the change, but are you sure memcpy(3) has any chance
to change errno? I think it would actually be a bug if it does, since it
is not meant to fail, and it is a pretty essential component for error
recovery (writing messages...).

This is not a definite answer but:
$ find NetBSD/src/common/lib/libc -name memcpy.S -exec grep errno {} \+
does not report anything.

Anyway, HTH,
-- 
khorben



Home | Main Index | Thread Index | Old Index