This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
sparc-tdep.c: __builtin___memcpy_chk overflows destination buffer
- From: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: Joel Sherrill <Joel dot Sherrill at oarcorp dot com>
- Date: Thu, 17 Sep 2009 04:36:00 +0200
- Subject: sparc-tdep.c: __builtin___memcpy_chk overflows destination buffer
Hi,
building gdb-6.8.91 for sparc-rtems* (sparc-elf) on F11/x86_64
raises this warning:
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I.
-I../../gdb-6.8.91/gdb -I../../gdb-6.8.91/gdb/common
-I../../gdb-6.8.91/gdb/config
-DLOCALEDIR="\"/opt/rtems-4.10/share/locale\"" -DHAVE_CONFIG_H
-I../../gdb-6.8.91/gdb/../include/opcode -I../bfd
-I../../gdb-6.8.91/gdb/../bfd -I../../gdb-6.8.91/gdb/../include
-I../libdecnumber -I../../gdb-6.8.91/gdb/../libdecnumber
-I../../gdb-6.8.91/gdb/gnulib -Ignulib -DMI_OUT=1 -DTUI=1 -Wall
-Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
-Wno-pointer-sign -Wno-unused -Wno-switch -Wno-char-subscripts -c -o
sparc-tdep.o -MT sparc-tdep.o -MMD -MP -MF .deps/sparc-tdep.Tpo
../../gdb-6.8.91/gdb/sparc-tdep.c
In file included from /usr/include/string.h:641,
from gnulib/string.h:24,
from ../../gdb-6.8.91/gdb/gdb_string.h:26,
from ../../gdb-6.8.91/gdb/vec.h:26,
from ../../gdb-6.8.91/gdb/breakpoint.h:26,
from ../../gdb-6.8.91/gdb/inferior.h:37,
from ../../gdb-6.8.91/gdb/sparc-tdep.c:32:
In function 'memcpy',
inlined from 'sparc32_store_return_value' at
../../gdb-6.8.91/gdb/sparc-tdep.c:1112,
inlined from 'sparc32_return_value' at
../../gdb-6.8.91/gdb/sparc-tdep.c:1170:
/usr/include/bits/string3.h:52: warning: call to __builtin___memcpy_chk
will always overflow destination buffer
The patch below is what I am including into the rtems-gdb patches.
I don't have write access to gdb-cvs, and would appreciate it, if
somebody else would apply the patch for me.
TIA,
Ralf
Attachment:
sparc-gdb-6.8.91-gdb-sim.diff
Description: Text document