From 295f9cdd56382fdf1409158bbeaafa590c26061a Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Tue, 18 Jul 2023 14:02:59 +0400 Subject: [PATCH] fix(esp_system): add no_sanitize_undefined for init functions Something wrong with -Og optimization. It started to fail without reason. --- components/esp_system/startup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/esp_system/startup.c b/components/esp_system/startup.c index 3d98a6e2fd..240e2f20e2 100644 --- a/components/esp_system/startup.c +++ b/components/esp_system/startup.c @@ -167,6 +167,7 @@ size_t __cxx_eh_arena_size_get(void) * over in ascending direction instead of descending direction. * The RISC-V-specific behavior is dependent on the linker script ld/esp32c3/sections.ld.in. */ +__attribute__((no_sanitize_undefined)) /* TODO: IDF-8133 */ static void do_global_ctors(void) { #if __riscv @@ -209,6 +210,7 @@ static void do_global_ctors(void) * The sequence of the init function calls (sorted by priority) is documented in * system_init_fn.txt file. */ +__attribute__((no_sanitize_undefined)) /* TODO: IDF-8133 */ static void do_system_init_fn(void) { extern esp_system_init_fn_t _esp_system_init_fn_array_start;