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 18:52:52 +0300 (MSK)
From: Alexander Monakov <amonakov@...ras.ru>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: Re: Documentation of memcpy and undefined behavior in
 memset

On Thu, 6 Jul 2017, Pascal Cuoq wrote:
> It can be argued that C11 does not define the behavior of memcpy in this case:
> https://stackoverflow.com/questions/25390577/is-memcpya-1-b-1-0-defined-in-c11

Is the main issue that there are doubts whether pointers one-past may be
"outside the address space of the program"? To me it's pretty clear that
while the standard doesn't appear to formally define the "address space",
the intent is that pointers one-past would be a part of it for. There are
indications in 6.5.8/5 ("When two pointers are compared, the result
depends on the relative locations in the address space of the objects
pointed to...") and footnote 106 to 6.5.6 in C11.

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.