Paul Eggert wrote: > > However, after implementing mbszero with this data and enabling its use > > in many places, I got test failures on NetBSD and Solaris. > > - On NetBSD, the minimum we need to clear is 28 bytes. > > - On Solaris OmniOS and OpenIndiana, the minimum we need to clear is 16 > > bytes. > > - On proprietary Solaris, the minimum we need to clear is 20 or 28 bytes > > (depending on 32-bit or 64-bit mode). > > So, clearly this is fragile stuff. > > Were the test failures for single calls to mbrtoc32, or were they for > something else?
Find attached the test failures on NetBSD 9.3 and Solaris 11.4, when I define _GL_MBSTATE_ZERO_SIZE to a value that is 4 bytes smaller than the working one. In all three cases, there were assertion "mbsinit (&iter->state)" failed failures, which means that mbsinit takes into account more initial bytes than we expected. On Solaris 11.4, there were also many test failures of other kinds. > If the former, what went wrong with the source-code analysis? On NetBSD, I apparently did not locate the right source code of the mbsinit function, due to the complexity of the citrus code. And did not want to debug it, because debugging in libc code without debugging information is often a waste of time. On Solaris 11.4, we don't have source code, and it apparently behaves differently than the OpenSolaris derivatives for which we have source code. > > +/* _GL_MBSTATE_INIT_SIZE describes how mbsinit() behaves: It is the > number of > > + bytes at the beginning of an mbstate_t that need to be zero, for > > mbsinit() > > + to return true. > > This macro is not used anywhere. How about adding a comment explaining > why it's defined but not used? Or if it's not needed we can remove it. It's needed, namely as lower bound for _GL_MBSTATE_ZERO_SIZE: 0 < _GL_MBSTATE_INIT_SIZE <= _GL_MBSTATE_ZERO_SIZE <= sizeof (mbstate_t). The test suite failures on NetBSD clearly showed what happens when we ignore what mbsinit() does. > > +# elif __GLIBC__ >= 2 /* glibc */ > > Should be glibc 2.2 not glibc 2, if I read the history right. Strictly speaking, yes. But we have long stopped supporting glibc 2.0 and 2.1 as portability targets. We removed m4/glibc21.m4 in 2020. > Also should check that __GLIBC__ is defined, for the benefit of picky > compilers. We have more than 300 uses of '# if/elif __GLIBC__ >= 2' in lib/*.h, and haven't received reports about it being a problem. So I guess people are clever enough to remove these extra-pickiness compiler options when they compile GNU code. > > # elif defined MUSL_LIBC /* musl libc */ > > /* mbstate_t is defined in <bits/alltypes.h>. > > It is an opaque aligned 8-byte struct, of which at most the first > > 4 bytes are used. > > For more details, see src/multibyte/mbrtowc.c. */ > > # define _GL_MBSTATE_INIT_SIZE 4 > > # define _GL_MBSTATE_ZERO_SIZE 4 > > Better to say 'sizeof (unsigned)' instead of '4', as the source code > uses 'unsigned'. This wouldn't affect the machine code on existing > platforms, would be better documentation, and would be theoretically > better on oddball future platforms. OK for documentation purposes. Regarding oddball future platforms, they can write 'unsigned long' instead of 'unsigned' in their definition of mbstate_t; therefore it does not really matter whether we write 4 or sizeof (unsigned). And I won't write sizeof (((mbstate_t) {0}).__count) outside of comments, since the less identifiers with double-underscore we use, the better. > On 64-bit Solaris 10 sparc with either GCC or Oracle's compiler, it's > the same number of insns to initialize 28 bytes vs 32 bytes. So if 28 is > needed let's drop the optimization for Solaris as not worth the > aggravation of maintaining and worrying about its brittleness. OK, done. Also because it's a proprietary platform and without source inspection, we cannot really know whether there's one locale encoding that needs the 32 bytes actually. > > +# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) > > Might be better to have this sort of thing at the end, as the default, > rather than sprinkle lots of copies of it elsewhere. OK, done. > Assuming the problem was not with single calls to mbrtoc32, how about if > we define another function mbszerotoc32 that is the minimum number of > bytes to clear so that a single call to mbrtoc32 will work? The problem with this proposal is that we then have two different functions, used in various places, and one of them will have at most half of the unit test coverage than what we have now. We are already far in the land of using undocumented internals and relying on accidental facts (such as the order of the fields in the mbstate_t). Only the unit tests give me a certain trust in what we do. In this situation, I would not like to bet that a random half of the unit tests will give us the same reliability. What would the advantage of mbszerotoc32 be? We care most about glibc platforms. Whether the compiled code clears 4 bytes or 8 bytes of memory (aligned), will not make a big difference, because - in the ASCII case, we have a tight loop without mbstate_t and without any function call, - in the non-ASCII case, we have to go through the slow glibc mbrtowc anyway. > I haven't installed this. Thanks for the ideas. The patch would not have been uncontroversial :) Here's what I'm committing. I haven't touched localeinfo.c since the code in there is only used for initialization (once per program invocation, I guess?), thus not performance critical. 2023-07-17 Bruno Haible <br...@clisp.org> mbszero: Source code tweaks. Suggested by Paul Eggert in <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00084.html>. * lib/wchar.in.h: Comment changes. (_GL_MBSTATE_INIT_SIZE): Don't define on NetBSD, Solaris, native Windows. Use a safe default at the end. (_GL_MBSTATE_ZERO_SIZE): Don't define on AIX, IRIX, Solaris, native Windows. Use a safe default at the end. * lib/mbrtoc16.c: Update comments accordingly. diff --git a/lib/mbrtoc16.c b/lib/mbrtoc16.c index 1afcde44cc..5fb0d74798 100644 --- a/lib/mbrtoc16.c +++ b/lib/mbrtoc16.c @@ -87,7 +87,7 @@ static_assert (sizeof (mbstate_t) >= 4); /* On Solaris, mbstate_t is defined in <wchar_impl.h>. It is an opaque aligned 24-byte or 32-byte struct, of which at most the first 20 or 28 bytes are used. - For more details, see the *State types in + For more details on OpenSolaris derivatives, see the *State types in illumos-gate/usr/src/lib/libc/port/locale/ {none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ # define SET_EXTRA_STATE(ps, c16) \ diff --git a/lib/wchar.in.h b/lib/wchar.in.h index 7d2c5ecd12..430fa6fcec 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -349,24 +349,30 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " - for mbsinit() to return true, and - for all other multibyte-aware functions to operate properly. 0 < _GL_MBSTATE_INIT_SIZE <= _GL_MBSTATE_ZERO_SIZE <= sizeof (mbstate_t). - These values are determined by source code inspection. */ + These values are determined by source code inspection, where possible, and + by running the gnulib unit tests. + We need _GL_MBSTATE_INIT_SIZE because if we define _GL_MBSTATE_ZERO_SIZE + without considering what mbsinit() does, we get test failures such as + assertion "mbsinit (&iter->state)" failed + */ # if GNULIB_defined_mbstate_t /* AIX, IRIX */ /* mbstate_t has at least 4 bytes. They are used as coded in gnulib/lib/mbrtowc.c. */ # define _GL_MBSTATE_INIT_SIZE 1 -/* Note that 4 is not the correct value: it causes test failures. */ -# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) -# elif __GLIBC__ >= 2 /* glibc */ +/* define _GL_MBSTATE_ZERO_SIZE 4 + does not work: it causes test failures. + So, use the safe fallback value, below. */ +# elif __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 /* glibc */ /* mbstate_t is defined in <bits/types/__mbstate_t.h>. For more details, see glibc/iconv/skeleton.c. */ -# define _GL_MBSTATE_INIT_SIZE 4 +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (((mbstate_t) {0}).__count) */ # define _GL_MBSTATE_ZERO_SIZE /* 8 */ sizeof (mbstate_t) # elif defined MUSL_LIBC /* musl libc */ /* mbstate_t is defined in <bits/alltypes.h>. It is an opaque aligned 8-byte struct, of which at most the first 4 bytes are used. For more details, see src/multibyte/mbrtowc.c. */ -# define _GL_MBSTATE_INIT_SIZE 4 +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (unsigned) */ # define _GL_MBSTATE_ZERO_SIZE 4 # elif defined __APPLE__ && defined __MACH__ /* macOS */ /* On macOS, mbstate_t is defined in <machine/_types.h>. @@ -425,8 +431,8 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " citrus/modules/citrus_dechanyu.c 8 citrus/modules/citrus_johab.c 6 citrus/modules/citrus_utf8.c 12 */ -/* But 12 is not the correct value: we get test failures for values < 28. */ -# define _GL_MBSTATE_INIT_SIZE 28 +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 28. */ # define _GL_MBSTATE_ZERO_SIZE 28 # elif defined __OpenBSD__ /* OpenBSD */ /* On OpenBSD, mbstate_t is defined in src/sys/sys/_types.h. @@ -451,7 +457,7 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " /* On Solaris, mbstate_t is defined in <wchar_impl.h>. It is an opaque aligned 24-byte or 32-byte struct, of which at most the first 20 or 28 bytes are used. - For more details, see the *State types in + For more details on OpenSolaris derivatives, see the *State types in illumos-gate/usr/src/lib/libc/port/locale/ {none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ /* File INIT_SIZE ZERO_SIZE @@ -463,29 +469,25 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " gbk.c 4 4 gb18030.c 4 8 utf8.c 12 12 */ -/* But 12 is not the correct value: we get test failures +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures - in OpenIndiana and OmniOS: for values < 16, - in Solaris 10 and 11: for values < 20 (in 32-bit mode) - or < 28 (in 64-bit mode). */ -# if defined _LP64 -# define _GL_MBSTATE_INIT_SIZE 28 -# define _GL_MBSTATE_ZERO_SIZE 28 -# else -# define _GL_MBSTATE_INIT_SIZE 20 -# define _GL_MBSTATE_ZERO_SIZE 20 -# endif + or < 28 (in 64-bit mode). + Since we don't have a good way to distinguish the OpenSolaris derivatives + from the proprietary Solaris versions, and can't inspect the Solaris source + code, use the safe fallback values, below. */ # elif defined __CYGWIN__ /* Cygwin */ /* On Cygwin, mbstate_t is defined in <sys/_types.h>. For more details, see newlib/libc/stdlib/mbtowc_r.c and winsup/cygwin/strfuncs.cc. */ -# define _GL_MBSTATE_INIT_SIZE 4 +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (int) */ # define _GL_MBSTATE_ZERO_SIZE 8 # elif defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ /* MSVC defines 'mbstate_t' as an aligned 8-byte struct. On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined - as an aligned 8-byte struct, of which the first 4 bytes matter. */ -# define _GL_MBSTATE_INIT_SIZE sizeof (mbstate_t) -# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) + as an aligned 8-byte struct, of which the first 4 bytes matter. + Use the safe values, below. */ # elif defined __ANDROID__ /* Android */ /* Android defines 'mbstate_t' in <bits/mbstate_t.h>. It is an opaque 4-byte or 8-byte struct. @@ -496,10 +498,12 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " */ # define _GL_MBSTATE_INIT_SIZE 4 # define _GL_MBSTATE_ZERO_SIZE 4 -# else -/* On platforms where we don't know how the multibyte functions behave, use - these safe values. */ +# endif +/* Use safe values as defaults. */ +# ifndef _GL_MBSTATE_INIT_SIZE # define _GL_MBSTATE_INIT_SIZE sizeof (mbstate_t) +# endif +# ifndef _GL_MBSTATE_ZERO_SIZE # define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) # endif _GL_BEGIN_C_LINKAGE
FAIL: test-mbscasestr2.sh ========================= assertion "mbsinit (&iter->state)" failed: file "../../gllib/mbuiter.h", line 157, function "mbuiter_multi_next" [1] Abort trap (core dumped) LC_ALL=${LOCALE_FR_UTF8} ${CHECKER} ./test-mbs... FAIL test-mbscasestr2.sh (exit status: 134) FAIL: test-mbscspn.sh ===================== assertion "mbsinit (&iter->state)" failed: file "../../gllib/mbuiter.h", line 157, function "mbuiter_multi_next" [1] Abort trap (core dumped) LC_ALL=${LOCALE_FR_UTF8} ${CHECKER} ./test-mbs... FAIL test-mbscspn.sh (exit status: 134) FAIL: test-mbspbrk.sh ===================== assertion "mbsinit (&iter->state)" failed: file "../../gllib/mbuiter.h", line 157, function "mbuiter_multi_next" [1] Abort trap (core dumped) LC_ALL=${LOCALE_FR_UTF8} ${CHECKER} ./test-mbs... FAIL test-mbspbrk.sh (exit status: 134) FAIL: test-mbsspn.sh ==================== assertion "mbsinit (&iter->state)" failed: file "../../gllib/mbuiter.h", line 157, function "mbuiter_multi_next" [1] Abort trap (core dumped) LC_ALL=${LOCALE_FR_UTF8} ${CHECKER} ./test-mbs... FAIL test-mbsspn.sh (exit status: 134) FAIL: test-mbsstr2.sh ===================== assertion "mbsinit (&iter->state)" failed: file "../../gllib/mbuiter.h", line 157, function "mbuiter_multi_next" [1] Abort trap (core dumped) LC_ALL=${LOCALE_FR_UTF8} ${CHECKER} ./test-mbs... FAIL test-mbsstr2.sh (exit status: 134) FAIL: test-trim2.sh =================== assertion "mbsinit (&iter->state)" failed: file "../../gllib/mbiter.h", line 149, function "mbiter_multi_next" [1] Abort trap (core dumped) LC_ALL=${LOCALE_FR_UTF8} ${CHECKER} ./test-tri... FAIL test-trim2.sh (exit status: 134) FAIL: unistdio/test-ulc-vasnprintf3.sh ====================================== assertion "mbsinit (&iter->state)" failed: file "../../gllib/mbiter.h", line 149, function "mbiter_multi_next" [1] Abort trap (core dumped) LC_ALL=${testlocale} ${CHECKER} ./test-ulc-vas... FAIL unistdio/test-ulc-vasnprintf3.sh (exit status: 134)
FAIL: test-c32rtomb.sh ====================== ../../gltests/test-c32rtomb.c:48: assertion 'ret == n' failed ../../gltests/test-c32rtomb.sh: line 6: 19326: Abort(coredump) FAIL test-c32rtomb.sh (exit status: 1) FAIL: test-c32snrtombs-1.sh =========================== ../../gltests/test-c32snrtombs.c:63: assertion 'ret == 5' failed ../../gltests/test-c32snrtombs-1.sh: line 14: 19366: Abort(coredump) ../../build-aux/test-driver: line 113: 19365: Abort(coredump) FAIL test-c32snrtombs-1.sh (exit status: 262) FAIL: test-c32snrtombs-2.sh =========================== ../../gltests/test-c32snrtombs.c:92: assertion 'ret == 5' failed ../../gltests/test-c32snrtombs-2.sh: line 14: 19371: Abort(coredump) ../../build-aux/test-driver: line 113: 19370: Abort(coredump) FAIL test-c32snrtombs-2.sh (exit status: 262) FAIL: test-c32snrtombs-3.sh =========================== ../../gltests/test-c32snrtombs.c:129: assertion 'ret == 5' failed ../../gltests/test-c32snrtombs-3.sh: line 14: 19376: Abort(coredump) ../../build-aux/test-driver: line 113: 19375: Abort(coredump) FAIL test-c32snrtombs-3.sh (exit status: 262) FAIL: test-c32srtombs-1.sh ========================== ../../gltests/test-c32srtombs.c:63: assertion 'ret == 5' failed ../../gltests/test-c32srtombs-1.sh: line 14: 19386: Abort(coredump) ../../build-aux/test-driver: line 113: 19385: Abort(coredump) FAIL test-c32srtombs-1.sh (exit status: 262) FAIL: test-c32srtombs-2.sh ========================== ../../gltests/test-c32srtombs.c:92: assertion 'ret == 5' failed ../../gltests/test-c32srtombs-2.sh: line 14: 19391: Abort(coredump) ../../build-aux/test-driver: line 113: 19390: Abort(coredump) FAIL test-c32srtombs-2.sh (exit status: 262) FAIL: test-c32srtombs-3.sh ========================== ../../gltests/test-c32srtombs.c:129: assertion 'ret == 5' failed ../../gltests/test-c32srtombs-3.sh: line 14: 19396: Abort(coredump) ../../build-aux/test-driver: line 113: 19395: Abort(coredump) FAIL test-c32srtombs-3.sh (exit status: 262) FAIL: test-c32stombs-1.sh ========================= ../../gltests/test-c32stombs.c:62: assertion 'ret == 5' failed ../../gltests/test-c32stombs-1.sh: line 14: 19406: Abort(coredump) ../../build-aux/test-driver: line 113: 19405: Abort(coredump) FAIL test-c32stombs-1.sh (exit status: 262) FAIL: test-c32stombs-2.sh ========================= ../../gltests/test-c32stombs.c:87: assertion 'ret == 5' failed ../../gltests/test-c32stombs-2.sh: line 14: 19411: Abort(coredump) ../../build-aux/test-driver: line 113: 19410: Abort(coredump) FAIL test-c32stombs-2.sh (exit status: 262) FAIL: test-c32stombs-3.sh ========================= ../../gltests/test-c32stombs.c:116: assertion 'ret == 5' failed ../../gltests/test-c32stombs-3.sh: line 14: 19416: Abort(coredump) ../../build-aux/test-driver: line 113: 19415: Abort(coredump) FAIL test-c32stombs-3.sh (exit status: 262) FAIL: test-c32tolower.sh ======================== + ./test-c32tolower 0 + LC_ALL=C + ./test-c32tolower 0 + LC_ALL=POSIX + : fr_FR + test fr_FR '!=' none + ./test-c32tolower 1 + LC_ALL=fr_FR ../../gltests/test-c32tolower.c:144: assertion 'mb.nbytes == 1' failed ../../gltests/test-c32tolower.sh: line 13: 19432: Abort(coredump) + exit 1 FAIL test-c32tolower.sh (exit status: 1) FAIL: test-c32toupper.sh ======================== + ./test-c32toupper 0 + LC_ALL=C + ./test-c32toupper 0 + LC_ALL=POSIX + : fr_FR + test fr_FR '!=' none + ./test-c32toupper 1 + LC_ALL=fr_FR ../../gltests/test-c32toupper.c:144: assertion 'mb.nbytes == 1' failed ../../gltests/test-c32toupper.sh: line 13: 19439: Abort(coredump) + exit 1 FAIL test-c32toupper.sh (exit status: 1) FAIL: test-flock ================ ../../gltests/test-flock.c:62: assertion 'r == -1' failed ../../build-aux/test-driver: line 114: 21274: Abort(coredump) FAIL test-flock (exit status: 262) FAIL: test-mbmemcasecoll2.sh ============================ ../../gltests/test-mbmemcasecmp.h:127: assertion 'my_casecmp ("\303\226ZG\303\234R", 7, "\303\266zg\303\274r", 7) == 0' failed ../../gltests/test-mbmemcasecoll2.sh: line 14: 22370: Abort(coredump) ../../build-aux/test-driver: line 113: 22369: Abort(coredump) FAIL test-mbmemcasecoll2.sh (exit status: 262) FAIL: test-mbrtoc32-1.sh ======================== ../../gltests/test-mbrtoc32.c:157: assertion 'c32tob (wc) == (unsigned char) '\374'' failed ../../gltests/test-mbrtoc32-1.sh: line 14: 22505: Abort(coredump) ../../build-aux/test-driver: line 113: 22504: Abort(coredump) FAIL test-mbrtoc32-1.sh (exit status: 262) FAIL: test-mbscasestr2.sh ========================= Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbscasestr2.sh: line 14: 22635: Abort(coredump) ../../build-aux/test-driver: line 113: 22634: Abort(coredump) FAIL test-mbscasestr2.sh (exit status: 262) FAIL: test-mbscasestr3.sh ========================= Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbscasestr3.sh: line 14: 22640: Abort(coredump) ../../build-aux/test-driver: line 113: 22639: Abort(coredump) FAIL test-mbscasestr3.sh (exit status: 262) FAIL: test-mbschr.sh ==================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbschr.sh: line 14: 22649: Abort(coredump) ../../build-aux/test-driver: line 113: 22648: Abort(coredump) FAIL test-mbschr.sh (exit status: 262) FAIL: test-mbscspn.sh ===================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbscspn.sh: line 14: 22654: Abort(coredump) ../../build-aux/test-driver: line 113: 22653: Abort(coredump) FAIL test-mbscspn.sh (exit status: 262) FAIL: test-mbsnrtoc32s-1.sh =========================== ../../gltests/test-mbsnrtoc32s.c:120: assertion 'c32tob (wc) == (unsigned char) '\374'' failed ../../gltests/test-mbsnrtoc32s-1.sh: line 14: 22668: Abort(coredump) ../../build-aux/test-driver: line 113: 22667: Abort(coredump) FAIL test-mbsnrtoc32s-1.sh (exit status: 262) FAIL: test-mbspbrk.sh ===================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbspbrk.sh: line 14: 22720: Abort(coredump) ../../build-aux/test-driver: line 113: 22719: Abort(coredump) FAIL test-mbspbrk.sh (exit status: 262) FAIL: test-mbsrchr.sh ===================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbsrchr.sh: line 14: 22729: Abort(coredump) ../../build-aux/test-driver: line 113: 22728: Abort(coredump) FAIL test-mbsrchr.sh (exit status: 262) FAIL: test-mbsrtoc32s-1.sh ========================== ../../gltests/test-mbsrtoc32s.c:120: assertion 'c32tob (wc) == (unsigned char) '\374'' failed ../../gltests/test-mbsrtoc32s-1.sh: line 14: 22734: Abort(coredump) ../../build-aux/test-driver: line 113: 22733: Abort(coredump) FAIL test-mbsrtoc32s-1.sh (exit status: 262) FAIL: test-mbsspn.sh ==================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbsspn.sh: line 14: 22786: Abort(coredump) ../../build-aux/test-driver: line 113: 22785: Abort(coredump) FAIL test-mbsspn.sh (exit status: 262) FAIL: test-mbsstr2.sh ===================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbsstr2.sh: line 14: 22795: Abort(coredump) ../../build-aux/test-driver: line 113: 22794: Abort(coredump) FAIL test-mbsstr2.sh (exit status: 262) FAIL: test-mbsstr3.sh ===================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbsstr3.sh: line 14: 22800: Abort(coredump) ../../build-aux/test-driver: line 113: 22799: Abort(coredump) FAIL test-mbsstr3.sh (exit status: 262) FAIL: test-mbstoc32s-1.sh ========================= ../../gltests/test-mbstoc32s.c:48: assertion 'ret == 0' failed ../../gltests/test-mbstoc32s-1.sh: line 14: 22805: Abort(coredump) ../../build-aux/test-driver: line 113: 22804: Abort(coredump) FAIL test-mbstoc32s-1.sh (exit status: 262) FAIL: test-mbstoc32s-2.sh ========================= ../../gltests/test-mbstoc32s.c:48: assertion 'ret == 0' failed ../../gltests/test-mbstoc32s-2.sh: line 14: 22810: Abort(coredump) ../../build-aux/test-driver: line 113: 22809: Abort(coredump) FAIL test-mbstoc32s-2.sh (exit status: 262) FAIL: test-mbstoc32s-3.sh ========================= ../../gltests/test-mbstoc32s.c:48: assertion 'ret == 0' failed ../../gltests/test-mbstoc32s-3.sh: line 14: 22815: Abort(coredump) ../../build-aux/test-driver: line 113: 22814: Abort(coredump) FAIL test-mbstoc32s-3.sh (exit status: 262) FAIL: test-mbstoc32s-4.sh ========================= ../../gltests/test-mbstoc32s.c:48: assertion 'ret == 0' failed ../../gltests/test-mbstoc32s-4.sh: line 14: 22820: Abort(coredump) ../../build-aux/test-driver: line 113: 22819: Abort(coredump) FAIL test-mbstoc32s-4.sh (exit status: 262) FAIL: test-mbstoc32s-5.sh ========================= ../../gltests/test-mbstoc32s.c:48: assertion 'ret == 0' failed ../../gltests/test-mbstoc32s-5.sh: line 4: 22825: Abort(coredump) FAIL test-mbstoc32s-5.sh (exit status: 1) FAIL: test-trim2.sh =================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbiter.h, line 149, function mbiter_multi_next ../../gltests/test-trim2.sh: line 14: 24916: Abort(coredump) ../../build-aux/test-driver: line 113: 24915: Abort(coredump) FAIL test-trim2.sh (exit status: 262) FAIL: test-trim3.sh =================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbiter.h, line 149, function mbiter_multi_next ../../gltests/test-trim3.sh: line 14: 24921: Abort(coredump) ../../build-aux/test-driver: line 113: 24920: Abort(coredump) FAIL test-trim3.sh (exit status: 262) FAIL: unistdio/test-ulc-vasnprintf3.sh ====================================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbiter.h, line 149, function mbiter_multi_next ../../gltests/unistdio/test-ulc-vasnprintf3.sh: line 20: 26300: Abort(coredump) ../../build-aux/test-driver: line 113: 26298: Abort(coredump) FAIL unistdio/test-ulc-vasnprintf3.sh (exit status: 262) FAIL: test-vasnwprintf-posix ============================ ../../gltests/test-vasnwprintf-posix.c:3546: assertion 'result != NULL' failed ../../build-aux/test-driver: line 114: 27040: Abort(coredump) FAIL test-vasnwprintf-posix (exit status: 262)
FAIL: test-c32rtomb.sh ====================== ../../gltests/test-c32rtomb.c:104: assertion 'ret == 1' failed ../../gltests/test-c32rtomb.sh: line 6: 1569: Abort(coredump) FAIL test-c32rtomb.sh (exit status: 1) FAIL: test-c32snrtombs-1.sh =========================== ../../gltests/test-c32snrtombs.c:63: assertion 'ret == 5' failed ../../gltests/test-c32snrtombs-1.sh: line 14: 1609: Abort(coredump) ../../build-aux/test-driver: line 113: 1608: Abort(coredump) FAIL test-c32snrtombs-1.sh (exit status: 262) FAIL: test-c32snrtombs-2.sh =========================== ../../gltests/test-c32snrtombs.c:92: assertion 'ret == 5' failed ../../gltests/test-c32snrtombs-2.sh: line 14: 1614: Abort(coredump) ../../build-aux/test-driver: line 113: 1613: Abort(coredump) FAIL test-c32snrtombs-2.sh (exit status: 262) FAIL: test-c32snrtombs-3.sh =========================== ../../gltests/test-c32snrtombs.c:129: assertion 'ret == 5' failed ../../gltests/test-c32snrtombs-3.sh: line 14: 1619: Abort(coredump) ../../build-aux/test-driver: line 113: 1618: Abort(coredump) FAIL test-c32snrtombs-3.sh (exit status: 262) FAIL: test-c32srtombs-1.sh ========================== ../../gltests/test-c32srtombs.c:63: assertion 'ret == 5' failed ../../gltests/test-c32srtombs-1.sh: line 14: 1629: Abort(coredump) ../../build-aux/test-driver: line 113: 1628: Abort(coredump) FAIL test-c32srtombs-1.sh (exit status: 262) FAIL: test-c32srtombs-2.sh ========================== ../../gltests/test-c32srtombs.c:92: assertion 'ret == 5' failed ../../gltests/test-c32srtombs-2.sh: line 14: 1634: Abort(coredump) ../../build-aux/test-driver: line 113: 1633: Abort(coredump) FAIL test-c32srtombs-2.sh (exit status: 262) FAIL: test-c32srtombs-3.sh ========================== ../../gltests/test-c32srtombs.c:129: assertion 'ret == 5' failed ../../gltests/test-c32srtombs-3.sh: line 14: 1639: Abort(coredump) ../../build-aux/test-driver: line 113: 1638: Abort(coredump) FAIL test-c32srtombs-3.sh (exit status: 262) FAIL: test-c32stombs-1.sh ========================= ../../gltests/test-c32stombs.c:62: assertion 'ret == 5' failed ../../gltests/test-c32stombs-1.sh: line 14: 1649: Abort(coredump) ../../build-aux/test-driver: line 113: 1648: Abort(coredump) FAIL test-c32stombs-1.sh (exit status: 262) FAIL: test-c32stombs-2.sh ========================= ../../gltests/test-c32stombs.c:87: assertion 'ret == 5' failed ../../gltests/test-c32stombs-2.sh: line 14: 1654: Abort(coredump) ../../build-aux/test-driver: line 113: 1653: Abort(coredump) FAIL test-c32stombs-2.sh (exit status: 262) FAIL: test-c32stombs-3.sh ========================= ../../gltests/test-c32stombs.c:116: assertion 'ret == 5' failed ../../gltests/test-c32stombs-3.sh: line 14: 1659: Abort(coredump) ../../build-aux/test-driver: line 113: 1658: Abort(coredump) FAIL test-c32stombs-3.sh (exit status: 262) FAIL: test-flock ================ ../../gltests/test-flock.c:62: assertion 'r == -1' failed ../../build-aux/test-driver: line 114: 3523: Abort(coredump) FAIL test-flock (exit status: 262) FAIL: test-mbmemcasecmp2.sh =========================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbiter.h, line 149, function mbiter_multi_next ../../gltests/test-mbmemcasecmp2.sh: line 14: 4605: Abort(coredump) ../../build-aux/test-driver: line 113: 4604: Abort(coredump) FAIL test-mbmemcasecmp2.sh (exit status: 262) FAIL: test-mbmemcasecoll2.sh ============================ ../../gltests/test-mbmemcasecmp.h:266: assertion 'my_casecmp (input, SIZEOF (input), casefolded, SIZEOF (casefolded)) == 0' failed ../../gltests/test-mbmemcasecoll2.sh: line 14: 4619: Abort(coredump) ../../build-aux/test-driver: line 113: 4618: Abort(coredump) FAIL test-mbmemcasecoll2.sh (exit status: 262) FAIL: test-mbrtoc16-1.sh ======================== ../../gltests/test-mbrtoc16.c:157: assertion 'c32tob (wc) == (unsigned char) '\374'' failed ../../gltests/test-mbrtoc16-1.sh: line 14: 4689: Abort(coredump) ../../build-aux/test-driver: line 113: 4688: Abort(coredump) FAIL test-mbrtoc16-1.sh (exit status: 262) FAIL: test-mbrtoc32-1.sh ======================== ../../gltests/test-mbrtoc32.c:157: assertion 'c32tob (wc) == (unsigned char) '\374'' failed ../../gltests/test-mbrtoc32-1.sh: line 14: 4754: Abort(coredump) ../../build-aux/test-driver: line 113: 4753: Abort(coredump) FAIL test-mbrtoc32-1.sh (exit status: 262) FAIL: test-mbscasestr2.sh ========================= Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbscasestr2.sh: line 14: 4884: Abort(coredump) ../../build-aux/test-driver: line 113: 4883: Abort(coredump) FAIL test-mbscasestr2.sh (exit status: 262) FAIL: test-mbscasestr3.sh ========================= Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbscasestr3.sh: line 14: 4889: Abort(coredump) ../../build-aux/test-driver: line 113: 4888: Abort(coredump) FAIL test-mbscasestr3.sh (exit status: 262) FAIL: test-mbscspn.sh ===================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbscspn.sh: line 14: 4903: Abort(coredump) ../../build-aux/test-driver: line 113: 4902: Abort(coredump) FAIL test-mbscspn.sh (exit status: 262) FAIL: test-mbsnrtoc32s-1.sh =========================== ../../gltests/test-mbsnrtoc32s.c:120: assertion 'c32tob (wc) == (unsigned char) '\374'' failed ../../gltests/test-mbsnrtoc32s-1.sh: line 14: 4917: Abort(coredump) ../../build-aux/test-driver: line 113: 4916: Abort(coredump) FAIL test-mbsnrtoc32s-1.sh (exit status: 262) FAIL: test-mbspbrk.sh ===================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbspbrk.sh: line 14: 4969: Abort(coredump) ../../build-aux/test-driver: line 113: 4968: Abort(coredump) FAIL test-mbspbrk.sh (exit status: 262) FAIL: test-mbsrchr.sh ===================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbsrchr.sh: line 14: 4978: Abort(coredump) ../../build-aux/test-driver: line 113: 4977: Abort(coredump) FAIL test-mbsrchr.sh (exit status: 262) FAIL: test-mbsrtoc32s-1.sh ========================== ../../gltests/test-mbsrtoc32s.c:120: assertion 'c32tob (wc) == (unsigned char) '\374'' failed ../../gltests/test-mbsrtoc32s-1.sh: line 14: 4983: Abort(coredump) ../../build-aux/test-driver: line 113: 4982: Abort(coredump) FAIL test-mbsrtoc32s-1.sh (exit status: 262) FAIL: test-mbsspn.sh ==================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbsspn.sh: line 14: 5035: Abort(coredump) ../../build-aux/test-driver: line 113: 5034: Abort(coredump) FAIL test-mbsspn.sh (exit status: 262) FAIL: test-mbsstr2.sh ===================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbsstr2.sh: line 14: 5044: Abort(coredump) ../../build-aux/test-driver: line 113: 5043: Abort(coredump) FAIL test-mbsstr2.sh (exit status: 262) FAIL: test-mbsstr3.sh ===================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbuiter.h, line 157, function mbuiter_multi_next ../../gltests/test-mbsstr3.sh: line 14: 5049: Abort(coredump) ../../build-aux/test-driver: line 113: 5048: Abort(coredump) FAIL test-mbsstr3.sh (exit status: 262) FAIL: test-mbstoc32s-1.sh ========================= ../../gltests/test-mbstoc32s.c:113: assertion 'ret == 3' failed ../../gltests/test-mbstoc32s-1.sh: line 14: 5054: Abort(coredump) ../../build-aux/test-driver: line 113: 5053: Abort(coredump) FAIL test-mbstoc32s-1.sh (exit status: 262) FAIL: test-mbstoc32s-3.sh ========================= ../../gltests/test-mbstoc32s.c:189: assertion 'ret == 3' failed ../../gltests/test-mbstoc32s-3.sh: line 14: 5064: Abort(coredump) ../../build-aux/test-driver: line 113: 5063: Abort(coredump) FAIL test-mbstoc32s-3.sh (exit status: 262) FAIL: test-mbstoc32s-5.sh ========================= ../../gltests/test-mbstoc32s.c:284: assertion 'ret == 1' failed ../../gltests/test-mbstoc32s-5.sh: line 4: 5074: Abort(coredump) FAIL test-mbstoc32s-5.sh (exit status: 1) FAIL: test-quotearg.sh ====================== ../../gltests/test-quotearg.h:53: assertion 'la == lb' failed ../../gltests/test-quotearg.sh: line 38: 6038: Abort(coredump) ../../build-aux/test-driver: line 113: 6035: Abort(coredump) FAIL test-quotearg.sh (exit status: 262) FAIL: test-trim2.sh =================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbiter.h, line 149, function mbiter_multi_next ../../gltests/test-trim2.sh: line 14: 7165: Abort(coredump) ../../build-aux/test-driver: line 113: 7164: Abort(coredump) FAIL test-trim2.sh (exit status: 262) FAIL: test-trim3.sh =================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbiter.h, line 149, function mbiter_multi_next ../../gltests/test-trim3.sh: line 14: 7170: Abort(coredump) ../../build-aux/test-driver: line 113: 7169: Abort(coredump) FAIL test-trim3.sh (exit status: 262) FAIL: unistdio/test-ulc-vasnprintf3.sh ====================================== Assertion failed: mbsinit (&iter->state), file ../../gllib/mbiter.h, line 149, function mbiter_multi_next ../../gltests/unistdio/test-ulc-vasnprintf3.sh: line 20: 8549: Abort(coredump) ../../build-aux/test-driver: line 113: 8547: Abort(coredump) FAIL unistdio/test-ulc-vasnprintf3.sh (exit status: 262) FAIL: test-vasnwprintf-posix ============================ ../../gltests/test-vasnwprintf-posix.c:3546: assertion 'result != NULL' failed ../../build-aux/test-driver: line 114: 9289: Abort(coredump) FAIL test-vasnwprintf-posix (exit status: 262)