This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
glibc 2.18 stdio-common/tst-long-dbl-fphex.c
- From: Olivier Langlois <olivier at olivierlanglois dot net>
- To: libc-alpha at sourceware dot org
- Date: Tue, 17 Sep 2013 00:04:55 -0400
- Subject: glibc 2.18 stdio-common/tst-long-dbl-fphex.c
- Authentication-results: sourceware.org; auth=none
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);