This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: sparc-tdep.c: __builtin___memcpy_chk overflows destination buffer
- From: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Ralf Corsepius <ralf dot corsepius at rtems dot org>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Joel Sherrill <Joel dot Sherrill at oarcorp dot com>
- Date: Fri, 18 Sep 2009 07:01:34 +0200
- Subject: Re: sparc-tdep.c: __builtin___memcpy_chk overflows destination buffer
- References: <4AB1A090.8030701@rtems.org> <20090917180452.GA2163@host0.dyn.jankratochvil.net>
On 09/17/2009 08:04 PM, Jan Kratochvil wrote:
Hi Ralf,
I think this is more a GCC fault:
[4.3/4.4/4.5 regression] Bogus __builtin___memcpy_chk overflow warning
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37060
I am inclined to agree, because this matches with what I observe:
This warning shows on
fedora-10-x86_64 (gcc-4.3.2),
fedora-11-x86_64 (gcc-4.4.1),
fedora-12-x86_64/rawhide (gcc-4.4.1),
openSUSE-11.0-x86_64 (gcc-4.3),
openSUSE-11.1-x86_64 (gcc-4.3).
I does not show on
openSUSE-10.3-x86_64 (gcc-4.2), centos-5-x86_64 (gcc-4.1.2) and the
i[356]86 variants of these OSes.
Anyway, using "size_t" instead of "int" suppresses the warning on all of
them :-)
Ralf