Open
Description
strncpy on ARC platform
When building c++ application for ARC em platform and using full newlibc (CONFIG_REQUIRES_FULL_LIBCPP=y, CONFIG_NEWLIB_LIBC=y). strncpy don't copy some string length correctly. It copies to little characters.
arc_em : strncpy copies string with len 23-30 incorrect.
arc_hs : strncpy copies string with len 23-39 incorrect.
The error only show up when using the full version of newlibc. Tested on sdk version 0.16.5-1 & 0.17.0
Repo
I created a small c++ sample to show the error.
west init -m https://github.com/fgihl/zephyr-ds18s20.git
cd zephyr
git checkout fgihl/strncpy-error
west update
west build -p -b qemu_arc/qemu_arc_em samples/strncpy_error/
west build -t run
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status