mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
feat(cpu): Configure panic exception generation using asm illegal instruction
This commit is contained in:
@@ -461,9 +461,12 @@ void IRAM_ATTR __attribute__((noreturn, no_sanitize_undefined)) panic_abort(cons
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ESP_COMPILER_DIAGNOSTIC_PUSH_IGNORE("-Wanalyzer-null-dereference")
|
||||
*((volatile int *) 0) = 0; // NOLINT(clang-analyzer-core.NullDereference) should be an invalid operation on targets
|
||||
ESP_COMPILER_DIAGNOSTIC_POP("-Wanalyzer-null-dereference")
|
||||
#ifdef __XTENSA__
|
||||
asm("ill"); // should be an invalid operation on xtensa targets
|
||||
#elif __riscv
|
||||
asm("unimp"); // should be an invalid operation on RISC-V targets
|
||||
#endif
|
||||
|
||||
while (1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user