[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#173486: patch for strfmon tests



Package: glibc
Version: 2.2.5-11.2

Here's a patch (to the glibc-cvs.dpatch patch) to fix the
"tst_strfmon" behaviour.  I didn't observe a crash in "tst-widetext",
so I don't have a patch for that.

The problem is that the glibc-cvs patch changes a bunch of the strfmon
tests (in "dat_strfmon.c" run by "tst_strfmon.c") to pass a buffer
size argument of 33 instead of 32.  Unfortunately, the actual
allocated buffer is only of size 32 (the value of MONSIZE in
"tst_types.h").  One of the early test (#5, I think) smashes the
stack, and the test program segfaults when the main() function tries
to return.

This patch just adds a patch chunk to "glibc-cvs.dpatch" to bump the
MONSIZE to 64, leaving plenty of slack.

diff -ru glibc-2.2.5.original/debian/patches/glibc-cvs.dpatch glibc-2.2.5/debian/patches/glibc-cvs.dpatch
--- glibc-2.2.5.original/debian/patches/glibc-cvs.dpatch	Fri Mar 21 13:03:50 2003
+++ glibc-2.2.5/debian/patches/glibc-cvs.dpatch	Fri Mar 21 13:05:55 2003
@@ -5004,6 +5004,18 @@
        },
        { is_last: 1 }
      }
+diff -ru glibc-current/localedata/tests-mbwc/tst_types.h glibc-cvs/localedata/tests-mbwc/tst_types.h
+--- glibc-current/localedata/tests-mbwc/tst_types.h	Mon Aug  7 11:37:32 2000
++++ glibc-cvs/localedata/tests-mbwc/tst_types.h	Fri Mar 21 11:57:37 2003
+@@ -19,7 +19,7 @@
+ #define MBSSIZE		   24
+ #define WCSSIZE		   12
+ #define MONFMTSIZE	   16
+-#define MONSIZE		   32
++#define MONSIZE		   64
+ #define USE_MBCURMAX	   99	/* well, but ... */
+ #define TST_DBL_EPS	   2.22153e-16
+ #define WCSTOK_SEQNUM	   3
 diff -X .ignore -urN glibc-current/localedata/tst-fmon.data glibc-cvs/localedata/tst-fmon.data
 --- glibc-current/localedata/tst-fmon.data	Mon Jul  9 20:53:25 2001
 +++ glibc-cvs/localedata/tst-fmon.data	Sun Mar 24 08:43:23 2002

-- 
Kevin Buhr <buhr@telus.net>



Reply to: