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 13:22:18 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Documentation of memcpy and undefined behavior in memset

On Thu, Jul 06, 2017 at 08:17:32PM +0300, Alexander Monakov wrote:
> On Thu, 6 Jul 2017, Rich Felker wrote:
> 
> > If p points to one past the end of an object that ends on a page
> > boundary, this transformation could introduce a crash.
> 
> The object beginning at p (i.e. the array beginning just after the
> array which p was derived from) could be volatile, making that an
> invalid transformation. Nothing gives the compiler a guarantee
> that that area is non-volatile.

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.

Rich

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.