chore(core/rust): reduce coverage map size
What changed, and why it matters
This commit changes a code-coverage tracking map inside the Trezor firmware from a claimed capacity of 1,048,576 entries down to 65,536 entries. The commit message says the old capacity was never truly that large because the heapless library version in use would silently overflow. The change only affects internal test/debug instrumentation and is not a security fix for user funds or device secrets. It is marked with '[no changelog]', meaning the project did not treat it as a user-visible change.
No security action required. Treat as a routine maintenance/cleanup change to internal test instrumentation. If reviewing for release, verify that coverage builds still compile and that the reduced map size is acceptable for the project's coverage collection needs.
Security signals we found
No cryptographic or secret-handling code changed
No input parsing, deserialization, or memory allocator changes
Change is in a debug/test instrumentation module (coverage)
Commit explicitly labeled '[no changelog]'
No CVE, advisory, or vendor security statement present
Evidence from the diff
The diff modifies core/embed/rust/src/coverage/mod.rs, reducing the const generic size parameter of a static FnvIndexMap used to store coverage counters from 10241024 to 641024. The commit message notes that with heapless 0.9.2 the larger capacity would silently overflow, so the effective capacity was already limited. Coverage data is Rust firmware instrumentation data, not runtime wallet state, keys, or secrets. There is no change to cryptographic, storage, UI, or communication code.
Changed components
core/embed/rust/src/coverage/mod.rsInspect captured patch +1 / −1
### core/embed/rust/src/coverage/mod.rs
@@ -38,7 +38,7 @@ impl core::cmp::PartialEq for Key {
impl core::cmp::Eq for Key {}
-static COVERAGE_DATA: RwLock<FnvIndexMap<Key, u64, { 1024 * 1024 }>> =
+static COVERAGE_DATA: RwLock<FnvIndexMap<Key, u64, { 64 * 1024 }>> =
RwLock::new(FnvIndexMap::new());
struct Item<'a>((&'a Key, &'a u64));Why this scored 10/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.