Conversation
Contributor
The cached obsolete-count path lacked a direct assertion for the mapped-sector count returned to block reclamation. Added a simulator case with one obsolete and fourteen mapped sectors. It checks cache coverage, the selected block, and the returned erase and sector counts. CMake/Ninja regression tests passed 3/3 in each of the obsolete count cache, combined cache, and default coverage builds. Not run on hardware. Assisted-by: Codex (GPT-6) <noreply@openai.com>
Contributor
fdesbiens
added a commit
that referenced
this pull request
Sep 25, 2026
The NOR erase search fix from #83 landed on master while dev still used an uninitialized mapped count when obsolete counts came from cache or block metadata. Merge the master fix and its simulator regression into dev while preserving dev's newer cache tests. Repository checks, ECA, and the full regression job passed on the updated branch. Local GCC 14 CMake/Ninja tests passed 40/40 across ten configurations. Not run on hardware. Assisted-by: Codex (GPT-6) <noreply@openai.com>
fdesbiens
pushed a commit
that referenced
this pull request
Sep 25, 2026
On allocation failure, NOR block reclaim compared a null sector address with block pointers before reporting the error; in direct read builds, the old return could also use an uninitialized status. Return LX_SYSTEM_ALLOCATION_FAILED and skip address comparisons when allocation leaves its output null. A regression checks failures on the initial allocation and retry in buffered and direct read builds. Thanks to @jiri-novotny for identifying the status defect in #21. GCC 14 CMake/Ninja tests passed 50/50 across ten configurations with #83 on dev. Merged coverage reached 1,646/2,404 lines (68.47%) and 1,614/2,451 branches (65.85%). GitHub repository checks, ECA, and the full regression job passed. Not run on hardware. Assisted-by: Codex (GPT-6) <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The NOR erase search can obtain an obsolete count from the cache or block metadata without scanning the mapping table. It then copied an uninitialized mapped count into candidate state, which GCC could report as a maybe-uninitialized value.
The search now initializes the availability flag and resets the mapped count for each block. It still scans the chosen block before returning a mapped count when one was unavailable. A simulator regression checks a cached block with one obsolete and fourteen mapped sectors.
GCC 15 with -O2 -Werror=maybe-uninitialized rejected the base revision and built this PR. CMake/Ninja regression tests passed 3/3 in each of the obsolete count cache, combined cache, and default coverage configurations. Not run on hardware.