Skip to content

Commit f7ac9ea

Browse files
committed
feat(safety): make marker validation unconditional and update verified devices in README
1 parent 52af667 commit f7ac9ea

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,14 @@ This library has been verified to run correctly on embedded hardware without sta
420420

421421
| Architecture | Device | Status |
422422
| :--- | :--- | :--- |
423+
| **AVR (8-bit)** | ATmega328P (Nano SuperMini) | ![Status](https://img.shields.io/badge/Verified-success) |
423424
| **ARM Cortex-M0+** | Raspberry Pi Pico (RP2040) | ![Status](https://img.shields.io/badge/Verified-success) |
424-
| **Xtensa LX6** | ESP32-WROOM | ![Status](https://img.shields.io/badge/Verified-success) |
425+
| **ARM Cortex-M3** | BluePill (STM32F103C8) | ![Status](https://img.shields.io/badge/Verified-success) |
426+
| **ARM Cortex-M4** | BlackPill (STM32F411CE) | ![Status](https://img.shields.io/badge/Verified-success) |
427+
| **RISC-V (RV32IMC)** | ESP32-C3 (SuperMini) | ![Status](https://img.shields.io/badge/Verified-success) |
428+
| **Xtensa L106** | ESP8266 (NodeMCU with OLED) | ![Status](https://img.shields.io/badge/Verified-success) |
429+
| **Xtensa LX6** | ESP-32D (WROOM-32D) | ![Status](https://img.shields.io/badge/Verified-success) |
430+
| **Xtensa LX7** | ESP32-S3 (DevKitC-1) | ![Status](https://img.shields.io/badge/Verified-success) |
425431

426432
---
427433

easy_stack.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,9 +1352,11 @@ ESTACKDEF void estack_free_to_marker(EStack *ESTACK_RESTRICT stack, EStackMarker
13521352
*/
13531353

13541354
uintptr_t decoded_magic = marker.magic ^ stack_addr;
1355-
ESTACK_CHECK_V((decoded_magic == ESTACK_MAGIC),
1356-
"Internal Error: 'estack_free_to_marker' detected invalid, corrupted or alien stack marker");
1357-
1355+
if (ESTACK_UNLIKELY(decoded_magic != ESTACK_MAGIC)) {
1356+
ESTACK_ASSERT(false && "Internal Error: 'estack_free_to_marker' detected invalid, corrupted or alien stack marker");
1357+
return;
1358+
}
1359+
13581360
size_t decoded_index = marker.index ^ stack_addr;
13591361
size_t cur_index = estack_get_meta_index(stack);
13601362
ESTACK_CHECK_V((decoded_index <= cur_index),

0 commit comments

Comments
 (0)