alpha
Login
or
Join now
jmrp.io
/
kleidos
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/jmrplens/kleidos. Kleidos — Hardware BLE password manager for ESP32-S3 (M5StickC Plus2, StickS3, M5Stack Gray, T-Deck, Cardputer)
jmrplens.github.io/kleidos/
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
kleidos
/
test
/
crypto
/
test_vault_crypto
/
at
main
1 file
José M. Requena Plens
Make nothrow new honest and shrink the vault index footprint
7w ago
4ef79d21
test_vault_crypto.cpp
Make nothrow new honest and shrink the vault index footprint On this toolchain (ESP-IDF 6.0.x, exceptions off) the libstdc++ nothrow operator new delegates to the throwing form, whose bad_alloc lands in IDF's __cxa_allocate_exception stub and aborts — every nothrow OOM guard in the firmware was a panic in disguise (espressif/esp-idf#18226, closed Won't Do; v6.1-rc1 ships the identical stub). Define the replaceable nothrow allocation functions so failure returns nullptr again, verified by nm/addr2line against the linked image. The guard that exposed it: GET /api/groups aborted on the StickS3 in admin mode because the index crypto scratch asked for one capacity-sized cipher+plain slab (~30 KB contiguous at 150 slots) while the admin-mode heap's largest block was 45 KB with the row set already carved from it. Right-size both index scratches to the on-flash payload and split them into independent cipher/plain blocks, and stream the envelope tag through a new multipart HMAC (psa_mac_update x3) instead of materializing ctx||iv||cipher in a MaxCipher-sized stack array — the worker stack loses a ~15 KB transient that would have doubled at the planned 250-slot capacity. Also close the VaultStore::begin() refcount leak on the group-table corruption path, and cover the multipart HMAC with one-shot parity tests. Claude-Session: https://claude.ai/code/session_01Q2J5gQSFMTDLVzPUYog51r
1 month ago