Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 6 Jul 2017 20:38:29 +0300 (MSK)
From: Alexander Monakov <amonakov@...ras.ru>
To: musl@...ts.openwall.com
Subject: Re: Documentation of memcpy and undefined behavior in
 memset

On Thu, 6 Jul 2017, Rich Felker wrote:

> I'm doubtful of this. Certainly passing a pointer to memcpy with a
> nonzero n is a guarantee that the pointed-to object is non-volatile.
> The n=0 case is less clear though.

My view is that since in n=0 case no memory access inside of memcpy
takes place, the compiler may not deduce that the pointed-to object is
ok for speculative reads.

Alexander

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.