https://bugzilla.novell.com/show_bug.cgi?id=658509
https://bugzilla.novell.com/show_bug.cgi?id=658509#c8
--- Comment #8 from Stefan Krah 2011-01-07 22:46:58 UTC ---
as this seems only gcc 4.6, whihc is not yet released, please put pressure
on people to fix their glibcs.
Right. I decided to detect this in ./configure, using a variation of the
the code that Richard Guenther posted elsewhere. In case someone finds this
thread searching for a solution, this works for me:
AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
saved_cflags="$CFLAGS"
CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include
#include
#include
void foo(void *p, void *q) { memmove(p, q, 19); }
int main() {
char a[32] = "123456789000000000";
foo(&a[9], a);
if (strcmp(a, "123456789123456789000000000") != 0)
return 1;
foo(a, &a[9]);
if (strcmp(a, "123456789000000000") != 0)
return 1;
return 0;
}
]])],
[have_glibc_memmove_bug=no],
[have_glibc_memmove_bug=yes],
[have_glibc_memmove_bug=undefined])
CFLAGS="$saved_cflags"
AC_MSG_RESULT($have_glibc_memmove_bug)
if test "$have_glibc_memmove_bug" = yes; then
AC_DEFINE(HAVE_GLIBC_MEMMOVE_BUG, 1,
[Define if glibc has incorrect _FORTIFY_SOURCE wrappers
for memmove and bcopy.])
fi
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.