Conversation
Physical-sector allocation clears both output pointers on failure. Reclaim compared the null sector address with block pointers before reporting the error, which has undefined behavior in C99. Check the mapping output before both address range tests. Add a regression that fails the first allocation or its retry and verifies the returned error, diagnostic, and absence of writes or erases. GCC 14 CMake/Ninja: 4/4 tests passed in standalone buffered, standalone direct read, and ThreadX linked direct read builds. The coverage build passed its focused test; gcov recorded two allocation failure returns. Assisted-by: Codex (GPT-6) <noreply@openai.com>
Contributor
|
Thank you, @miracoli, for the fix, @rahmanih for the review, and @jiri-novotny for identifying the status defect. This will be part of the v6.5.2 release next week. |
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.
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_FAILEDand skip address comparisons when allocation leaves its output null. 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 the #83 fix 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.