aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/exec/(public-mirror)
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2026-03-22 12:37:06 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2026-03-26 11:41:49 +0000
commit253f15c016ca699906f78b8e522a3f7ed675929b (patch)
tree378539fe8826134f162a9ae9ecd6f97448e238c3 /packages/Python/lldbsuite/test/functionalities/exec/(public-mirror)
parent9b98c4b053917cad42e26596b37df72efab6dc39 (diff)
libc/amd64/strrchr.S: rewrite and fix scalar implementationHEADmain
The original scalar implementation of strrchr() had incorrect logic that failed if the character searched for was the NUL character. It was also possibly affected by the issue fixed in 3d8ef251a for strchrnul(). Rewrite the function with logic that actually works. We defer checking for the character until after we have checked for NUL. When we encounter the final NUL byte, we mask out the characters beyond the tail before checking for a match. This bug only affects users running on amd64 with ARCHLEVEL=scalar (cf. simd(7)). The default configuration is not affected. The bug was unfortunately not caught by the unit test inherited from NetBSD. An extended unit test catching the issue is proposed in D56037. PR: 293915 Reported by: safonov.paul@gmail.com Tested by: safonov.paul@gmail.com Fixes: 2ed514a220edbac6ca5ec9f40a3e0b3f2804796d See also: https://reviews.freebsd.org/D56037 MFC after: 1 week
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/exec/(public-mirror)')
0 files changed, 0 insertions, 0 deletions