nuttx/libs
anjiahao 7f5f0f5e53 libs/libc/string: Fix asrc alignment for unaligned access in memrchr.
memrchr scans backward, so the original implementation aligned
(x + 1) rather than x:

  #define UNALIGNED(x) ((long)(uintptr_t)((x) + 1) & (sizeof(long) - 1))

while the common UNALIGNED_X() macro checks the pointer itself.  Pass
src0 + 1 to UNALIGNED_X() to restore the original behavior, otherwise
asrc is off by one byte and the word loop reads the wrong data.

Assisted-by: Claude:claude-opus-5
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-08-17 10:47:33 +02:00
..
libbuiltin !sched/arch/libc: Give fork() and vfork() their real, separate semantics. 2026-08-10 08:57:30 -03:00
libc libs/libc/string: Fix asrc alignment for unaligned access in memrchr. 2026-08-17 10:47:33 +02:00
libdsp tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
libm cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
libnx tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
libxx cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
CMakeLists.txt libs: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00