While trying out the lastest offerings in Glibc (2.6.1) and GCC (4.2.1) via the DIY-Linux project (www.diy-linux-.org), I encountered the following error in the configure script when compiled with
CFLAGS="-O2 -fstack-protector -D_FORTIFY_SOURCE=2". Here is what I get: checking whether printf supports size specifiers as in C99... yes checking whether printf supports 'long double' arguments... yes checking whether printf supports infinite 'double' arguments... yes checking whether printf supports infinite 'long double' arguments... *** buffer overflow detected ***: ./conftest terminated ======= Backtrace: ========= /lib/libc.so.6(__chk_fail+0x41)[0xb7ed4191] /lib/libc.so.6[0xb7ed3998] /lib/libc.so.6(_IO_default_xsputn+0xb7)[0xb7e53d47] /lib/libc.so.6(__printf_fp+0x6a9)[0xb7e30559] /lib/libc.so.6(_IO_vfprintf+0x3c7)[0xb7e2b877] /lib/libc.so.6(__vsprintf_chk+0xad)[0xb7ed3a4d] /lib/libc.so.6(__sprintf_chk+0x30)[0xb7ed3980] ./conftest[0x8048d11] /lib/libc.so.6(__libc_start_main+0xe0)[0xb7e03f90] ./conftest[0x8048311] ======= Memory map: ======== 08048000-0804a000 r-xp 00000000 08:06 6295768 /var/local/slim/build/m4/source/m4-1.4.10/conftest 0804a000-0804b000 rw-p 00001000 08:06 6295768 /var/local/slim/build/m4/source/m4-1.4.10/conftest 0804b000-0806c000 rw-p 0804b000 00:00 0 [heap] b7de2000-b7dec000 r-xp 00000000 08:01 134 /usr/lib/libgcc_s.so.1 b7dec000-b7ded000 rw-p 00009000 08:01 134 /usr/lib/libgcc_s.so.1 b7ded000-b7dee000 rw-p b7ded000 00:00 0 b7dee000-b7f2d000 r-xp 00000000 08:01 20983511 /lib/libc-2.6.1.so b7f2d000-b7f2f000 r--p 0013f000 08:01 20983511 /lib/libc-2.6.1.so b7f2f000-b7f30000 rw-p 00141000 08:01 20983511 /lib/libc-2.6.1.so b7f30000-b7f34000 rw-p b7f30000 00:00 0 b7f37000-b7f53000 r-xp 00000000 08:01 20983504 /lib/ld-2.6.1.so b7f53000-b7f54000 r--p 0001b000 08:01 20983504 /lib/ld-2.6.1.so b7f54000-b7f55000 rw-p 0001c000 08:01 20983504 /lib/ld-2.6.1.so bfad6000-bfaec000 rw-p bfad6000 00:00 0 [stack] ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] no This problem also occurs when compiling with GCC 4.1.2 and Glibc 2.6.1. It was also confirmed by Greg Schafer from the DIY-Linux team on this post: http://www.diy-linux.org/pipermail/diy-linux-dev/2007-September/001103.html The buffer overflow doesn't seem to change the result of the test in our systems. Thanks for your help. -- @ - Alf _______________________________________________ Bug-m4 mailing list Bug-m4@gnu.org http://lists.gnu.org/mailman/listinfo/bug-m4