On Monday, January 16, 2017 11:57:03 Paul Eggert wrote: > Kamil Dudka wrote: > > It can cause a real crash in certain execution environments. > > Which ones? I'm not interested in environments like -fsanitize=undefined, > which is designed to catch violations of the standard. I want to know of a > real execution environment where memcpy (0, 0, 0) does something bad, and > why it does so.
Have you actually looked at the discussion I referenced? It was about memchr (0, 'a', 0) causing SIGSEGV without -fsanitize=undefined: https://lists.gnu.org/archive/html/bug-gnulib/2009-05/msg00081.html I am not sure about memcpy (0, 0, 0) in particular but, in principle, I see no difference between those two cases. Kamil