This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] strcpy optimizations
On Tue, Jan 29, 2013 at 02:27:28PM -0800, Roland McGrath wrote:
> It's certainly the case that strcpy et al must never write to any byte
> of the address space that its user-visible semantics do not allow it to
> change. (On a machine where the smallest size of write is larger than a
> byte, then of course it can write the whole smallest possible unit
> containing a byte that it's supposed to write.) Likewise, they must not
Such machines are not conforming(*) to the POSIX or C11 memory models;
I don't think it's useful to support them, and in fact I don't think
glibc supports any such machines anyway.
(*) Technically they could be made to conform, if EVERY single memory
access were wrapper by the compiler with a machine-wide lock/unlock
pair.
Rich