Bug 295823 - lib/libc/string/strrchr2_test:values test failing in CI due to bug in riscv strrchr.S
Summary: lib/libc/string/strrchr2_test:values test failing in CI due to bug in riscv s...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: 16.0-CURRENT
Hardware: riscv Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL: https://ci.freebsd.org/job/FreeBSD-ma...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2026-06-03 18:40 UTC by Siva Mahadevan
Modified: 2026-06-14 12:38 UTC (History)
3 users (show)

See Also:


Attachments
CI test report (97.69 KB, text/plain)
2026-06-03 18:40 UTC, Siva Mahadevan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Siva Mahadevan freebsd_committer freebsd_triage 2026-06-03 18:40:01 UTC
Created attachment 271451 [details]
CI test report

The 'lib.libc.string/strrchr2_test/values' testcase is currently failing in CI on riscv64 (URL and report attached in this bug).

This is locally reproducible with Bricoler with this command:

bricoler freebsd-regression-test-suite --freebsd-src-git-checkout/url=/usr/src --freebsd-src-git-checkout/branch= --freebsd-regression-test-suite/memory=3072 --freebsd-regression-test-suite/ncpus=2 --freebsd-regression-test-suite/parallelism=1 --freebsd-src-build/machine=riscv/riscv64 --freebsd-regression-test-suite/hypervisor=qemu --freebsd-vm-image/packages= --freebsd-regression-test-suite/tests='lib/libc/string/strrchr2_test:values'

fuz@, if I remove strrchr.S from MDSRCS in lib/libc/riscv/string/Makefile.inc, the test passes. This points to a bug in lib/libc/riscv/string/strrchr.S. Please triage as necessary.
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2026-06-07 00:58:24 UTC
Thank you for your report.

I'm currently on a conference, but will have a look at this one once I am back.
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-06-07 21:01:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=4996ebdb720042239a197ebec2d265cdfdf1bbf3

commit 4996ebdb720042239a197ebec2d265cdfdf1bbf3
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-07 19:00:33 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-07 20:59:19 +0000

    libc/riscv64: temporarily unhook strrchr() from the build

    A bug was discovered in the riscv64 assembly implementation of
    this function.  Fall back to the generic implementation until a
    fix can be developed.

    PR:             295823
    Reported by:    siva
    MFC after:      1 week

 lib/libc/riscv/string/Makefile.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-06-07 21:01:50 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=93221c277608d2612511eaabbf2bfc1f4b4250f7

commit 93221c277608d2612511eaabbf2bfc1f4b4250f7
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-07 20:58:31 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-07 21:00:25 +0000

    depend-cleanup.sh: rebuild strrchr.o on riscv64 if it came from strrchr.S

    We have to switch back to the previous rule once the temporary
    build fix has been replaced with a permanent fix.

    PR:             295823
    See also:       4996ebdb720042239a197ebec2d265cdfdf1bbf3
    Reported by:    siva
    MFC after:      1 week

 tools/build/depend-cleanup.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-06-14 12:38:01 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=d7d22907ff749664258208b250258f9f46d97572

commit d7d22907ff749664258208b250258f9f46d97572
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-07 20:58:31 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-14 09:35:23 +0000

    depend-cleanup.sh: rebuild strrchr.o on riscv64 if it came from strrchr.S

    We have to switch back to the previous rule once the temporary
    build fix has been replaced with a permanent fix.

    PR:             295823
    See also:       4996ebdb720042239a197ebec2d265cdfdf1bbf3
    Reported by:    siva
    MFC after:      1 week

    (cherry picked from commit 93221c277608d2612511eaabbf2bfc1f4b4250f7)

 tools/build/depend-cleanup.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2026-06-14 12:38:02 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=808241e2ebe58645b650f0b6b13f461f7231a032

commit 808241e2ebe58645b650f0b6b13f461f7231a032
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-07 19:00:33 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-14 09:35:22 +0000

    libc/riscv64: temporarily unhook strrchr() from the build

    A bug was discovered in the riscv64 assembly implementation of
    this function.  Fall back to the generic implementation until a
    fix can be developed.

    PR:             295823
    Reported by:    siva
    MFC after:      1 week

    (cherry picked from commit 4996ebdb720042239a197ebec2d265cdfdf1bbf3)

 lib/libc/riscv/string/Makefile.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)