zephyr/subsys/debug/coredump
Armin Brauns cd7a6a4d55 coredump: use memmove instead of memcpy
With CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_LINKER_RAM, buffer_output() is
called on the entire RAM memory area. This includes the stack for the
coredump thread, which is where tmp_buf is stored. Eventually, it will copy
(parts of) tmp_buf into tmp_buf itself, which invokes Undefined Behaviour
in memcpy():

> The memory areas must not overlap.  Use memmove(3) if the memory areas do
> overlap.
- memcpy(3)

With picolibc, this is detected in __memcpy_chk() and causes a fault in
__chk_fail().

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-08-01 16:43:41 +02:00
..
CMakeLists.txt
coredump_backend_flash_partition.c coredump: use memmove instead of memcpy 2024-08-01 16:43:41 +02:00
coredump_backend_intel_adsp_mem_window.c
coredump_backend_logging.c
coredump_core.c everywhere: replace double words 2024-06-22 05:40:22 -04:00
coredump_internal.h debug: coredump: Move COREDUMP_*_STR strings to the public header 2024-05-25 14:39:18 -04:00
coredump_memory_regions.c
Kconfig coredump: significantly increase efficiency for small write block sizes 2024-08-01 16:40:26 +02:00