The 'lib/libc/string/strnlen_test:strnlen_size_max' test is failing on riscv64 in CI: lib/libc/string/strnlen_test:strnlen_size_max Result: failed: returned incorrect len (SIZE_MAX) Standard error: align = 1, maxlen = 18446744073709551615, len = 0 I have reproduced this error using Bricoler to run riscv64 using QEMU: $ bricoler run freebsd-src-regression-suite --param freebsd-src:url=/usr/src --param freebsd-src:branch= --param freebsd-src-build:machine=riscv/riscv64 --param freebsd-src-regression-suite:hypervisor=qemu --param freebsd-src-regression-suite:memory=4096 --param freebsd-src-regression-suite:ncpus=2 --param freebsd-src-regression-suite:parallelism=1 --param freebsd-src-regression-suite:tests='lib/libc/string/strnlen_test:strnlen_size_max' strajabot@ added the tests in https://cgit.freebsd.org/src/commit/?id=7bedae81adaff4b4d291ba1f650b5b915ce207bf (lib/libc/tests/string: add test for strnlen()), but there is no Bugzilla account associated with them. fuz@ since you reviewed and approved the changes in https://reviews.freebsd.org/D46275. Please triage as necessary. CC += emaste@ as another mentor.
Thank you for this finding. I messaged the author and will look into this.
*** Bug 293353 has been marked as a duplicate of this bug. ***
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2a4e3112c811b9892e14e15cfd23538e7e47329c commit 2a4e3112c811b9892e14e15cfd23538e7e47329c Author: Strahinja Stanišić <strajabot@FreeBSD.org> AuthorDate: 2026-03-07 21:59:25 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2026-03-07 22:11:11 +0000 libc/riscv64: temporarily disable strnlen() implementation until a fix is developed strnlen() doesn't seem to cope well with a length argument such that string pointer plus length overflows past the end of the address space. Reviewed by: fuz MFC after: 1 week PR: 293353, 293296 Differential Revision: https://reviews.freebsd.org/D55714 lib/libc/riscv/string/Makefile.inc | 1 - 1 file changed, 1 deletion(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b5514e1c6d9e7ec09b299a983d1ce32852e0d9dc commit b5514e1c6d9e7ec09b299a983d1ce32852e0d9dc Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2026-03-07 23:14:25 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2026-03-07 23:33:53 +0000 depend-cleanup.sh: rebuild strnlen.o on riscv64 if it came from strnlen.S We have to switch back to the previous rule once the temporary build fix has been replaced with a permanent fix. MFC after: 1 week See also: 2a4e3112c811b9892e14e15cfd23538e7e47329c PR: 293353, 293296 tools/build/depend-cleanup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=0536513edabc9ce3447738e986b0c9fff3907e64 commit 0536513edabc9ce3447738e986b0c9fff3907e64 Author: Strahinja Stanišić <strajabot@FreeBSD.org> AuthorDate: 2026-03-07 21:59:25 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2026-03-14 09:29:21 +0000 libc/riscv64: temporarily disable strnlen() implementation until a fix is developed strnlen() doesn't seem to cope well with a length argument such that string pointer plus length overflows past the end of the address space. Reviewed by: fuz MFC after: 1 week PR: 293353, 293296 Differential Revision: https://reviews.freebsd.org/D55714 (cherry picked from commit 2a4e3112c811b9892e14e15cfd23538e7e47329c) lib/libc/riscv/string/Makefile.inc | 1 - 1 file changed, 1 deletion(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=521519f72d599622a79ed79f93c4f4b208089174 commit 521519f72d599622a79ed79f93c4f4b208089174 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2026-03-07 23:14:25 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2026-03-14 09:29:22 +0000 depend-cleanup.sh: rebuild strnlen.o on riscv64 if it came from strnlen.S We have to switch back to the previous rule once the temporary build fix has been replaced with a permanent fix. MFC after: 1 week See also: 2a4e3112c811b9892e14e15cfd23538e7e47329c PR: 293353, 293296 (cherry picked from commit b5514e1c6d9e7ec09b299a983d1ce32852e0d9dc) tools/build/depend-cleanup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)