This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

glibc 2.18 stdio-common/tst-long-dbl-fphex.c


I am having this trace when executing the test:

*** buffer overflow detected
***: /home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/stdio-common/tst-long-dbl-fphex terminated
======= Backtrace: =========
/home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6(+0x7546a)[0xb75f546a]
/home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6(__fortify_fail+0x55)[0xb7699265]
/home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6(+0x11707b)[0xb769707b]
/home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6(+0x117f08)[0xb7697f08]
/home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6(__swprintf_chk+0x38)[0xb7697df8]
/home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/stdio-common/tst-long-dbl-fphex[0x8048ffb]
/home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/stdio-common/tst-long-dbl-fphex[0x8048e54]
/home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/libc.so.6(__libc_start_main+0xf4)[0xb7599cf4]
/home/lano1106/dev/packages/glibc/repos/core-i686/src/glibc-build/stdio-common/tst-long-dbl-fphex[0x8048e9d]

found out that it was a problem in the test:

--- glibc-2.18/stdio-common/tst-long-dbl-fphex.c.orig	2013-09-16
15:54:29.309243127 -0400
+++ glibc-2.18/stdio-common/tst-long-dbl-fphex.c	2013-09-16
15:54:49.333366964 -0400
@@ -28,7 +28,7 @@ do_test (void)
   int result = 0;
   const long double x = 24.5;
   wchar_t a[16];
-  swprintf (a, sizeof (a), L"%La\n", x);
+  swprintf (a, sizeof (a) / sizeof (a[0]), L"%La\n", x);
   wchar_t A[16];
   swprintf (A, sizeof (A) / sizeof (A[0]), L"%LA\n", x);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]