Synopsis: mbrtowc, mbrlen have wrong return value for some invalid byte sequences
State-Changed-From-To: needs-pullups->open
State-Changed-By: [email protected]
State-Changed-When: Fri, 26 Jun 2026 21:47:13 +0000
State-Changed-Why:
Looks like this broke some tests we already have -- either need to
fix the tests or fix the fix, not sure which:
https://releng.netbsd.org/b5reports/i386/commits-2026.06.html#build-2026.06.26.11.58.57
Test case: lib/libc/locale/t_mbrtowc/mbrtowc_internal
Duration: 0.003677 seconds
Termination reason
FAILED: Invalid sequence
Standard output stream
Checking string: "ABCD01234_\134"
Using locale: C
Using mbstate: no
First using repeated mbrtowc
Now using mbsrtowcs
Ok.
Checking string: "[\001\177][\200ÿ]["
Using locale: C/en_US.UTF-8/C/C/C/C
Using mbstate: no
First using repeated mbrtowc
Test case: lib/libc/locale/t_mbrtowc/mbrtowc_object
Duration: 0.003976 seconds
Termination reason
FAILED: Invalid sequence
Standard output stream
Checking string: "ABCD01234_\134"
Using locale: C
Using mbstate: yes
First using repeated mbrtowc
Now using mbsrtowcs
Ok.
Checking string: "[\001\177][\200ÿ]["
Using locale: C/en_US.UTF-8/C/C/C/C
Using mbstate: yes
First using repeated mbrtowc
Test case: lib/libc/locale/t_mbstowcs/mbstowcs_basic
Duration: 0.002706 seconds
Termination reason
FAILED: /tmp/build/2026.06.26.11.58.57-i386/src/tests/lib/libc/locale/t_mbstowcs.c:178: (ssize_t)mbstowcs(wbuf, t->data, SIZE-1): Illegal byte sequence
Standard output stream
Checking string: "[\001\177][\200ÿ]["
Using locale: C/en_US.UTF-8/C/C/C/C
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.