nuttx/libs/libc/string
fangpeina 319a9f9724 libs/libc/string: Fix the address calculation in memrchr fast path.
Remove the incorrect address restoration logic in the memrchr fast
path.  The UNALIGNED_X loop already ensures the proper alignment, so
the subsequent address recalculation is unnecessary and makes memrchr
return the wrong position.

This fixes the syslog message corruption where memrchr reports the
incorrect newline position.

Assisted-by: Claude:claude-opus-5
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-08-17 10:47:33 +02:00
..
CMakeLists.txt libc/string: Add BSD-optimized memset implementation. 2026-02-04 03:02:04 +08:00
Kconfig libc: Rename LIBC_STRING_OPTIMIZE to LIBC_NEWLIB_OPTSPEED 2025-01-20 22:27:19 +08:00
lib_bsdmemccpy.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdmemchr.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdmemcmp.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdmemcpy.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdmemrchr.c libs/libc/string: Fix the address calculation in memrchr fast path. 2026-08-17 10:47:33 +02:00
lib_bsdmemset.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdstpcpy.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdstpncpy.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdstrcat.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdstrchr.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdstrchrnul.c libc_bsd:add missing SPDX-License 2026-02-04 03:02:04 +08:00
lib_bsdstrcmp.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdstrcpy.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdstrlen.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdstrncmp.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdstrncpy.c libs/libc/string: Use long long to speed up the BSD string functions. 2026-08-17 10:47:33 +02:00
lib_bsdstrrchr.c libc_bsd:add missing SPDX-License 2026-02-04 03:02:04 +08:00
lib_explicit_bzero.c
lib_ffs.c
lib_ffsl.c
lib_ffsll.c !compiler: drop CONFIG_HAVE_LONG_LONG and require long long support 2026-05-19 16:21:28 +08:00
lib_fls.c
lib_flsl.c
lib_flsll.c !compiler: drop CONFIG_HAVE_LONG_LONG and require long long support 2026-05-19 16:21:28 +08:00
lib_index.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_isbasedigit.c
lib_memccpy.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_memchr.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
lib_memcmp.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_memcpy.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_memmem.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_memmove.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_mempcpy.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_memrchr.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_memset.c !compiler: drop CONFIG_HAVE_LONG_LONG and require long long support 2026-05-19 16:21:28 +08:00
lib_popcount.c
lib_popcountl.c
lib_popcountll.c
lib_rawmemchr.c
lib_rindex.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_skipspace.c
lib_stpcpy.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_stpncpy.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strcasecmp.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strcasestr.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strcat.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
lib_strchr.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
lib_strchrnul.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strcmp.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strcoll.c
lib_strcpy.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
lib_strcspn.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
lib_strdup.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strerror.c
lib_strerrorr.c
lib_strlcat.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strlcpy.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strlen.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
lib_strncasecmp.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strncat.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strncmp.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
lib_strncpy.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strndup.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strnlen.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strpbrk.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strrchr.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
lib_strsep.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strsignal.c
lib_strspn.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strstr.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
lib_strtok.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strtokr.c libc: remove reference to non-existent readme 2025-10-11 17:07:51 -04:00
lib_strverscmp.c
lib_strxfrm.c
lib_timingsafe_bcmp.c
lib_vikmemcpy.c !compiler: drop CONFIG_HAVE_LONG_LONG and require long long support 2026-05-19 16:21:28 +08:00
Make.defs libc/string: Add BSD-optimized memset implementation. 2026-02-04 03:02:04 +08:00