[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] dfa: port to gcc -fsanitize=undefined
From: |
Kamil Dudka |
Subject: |
Re: [PATCH] dfa: port to gcc -fsanitize=undefined |
Date: |
Mon, 16 Jan 2017 23:00:02 +0100 |
User-agent: |
KMail/4.14.10 (Linux/4.8.6-gentoo; KDE/4.14.24; x86_64; ; ) |
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