mirror of
https://github.com/apache/nuttx.git
synced 2026-09-06 17:06:31 +00:00
Add word-at-a-time strlcpy using DETECTNULL for both the copy phase and the strlen tail when truncated. The copy loop aligns src and processes a register at a time, falling to bytewise for the last word containing the terminator. When truncated, the remaining src length is measured with a second word-at-a-time loop. strlcpy has 46 call sites in a typical kernel image (more than strcpy) and is not covered by newlib OPTSPEED, making it a high-value target. Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: ganjing <ganjing@xiaomi.com> |
||
|---|---|---|
| .. | ||
| arm | ||
| arm64 | ||
| mips | ||
| renesas | ||
| risc-v | ||
| sim | ||
| sparc | ||
| tricore | ||
| x86 | ||
| x86_64 | ||
| xtensa | ||
| arch_atomic.c | ||
| arch_libc.c | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Make.defs | ||