Add test for failing dynamic allocation#810
Merged
mkannwischer merged 2 commits intomainfrom Dec 28, 2025
Merged
Conversation
f08f166 to
5b8519f
Compare
fc2ddb2 to
8e132e0
Compare
mkannwischer
requested changes
Dec 25, 2025
Contributor
mkannwischer
left a comment
There was a problem hiding this comment.
Thanks @hanno-becker. Could you reduce the diff to mlkem-native to make maintenance easier down the line.
8e132e0 to
a9bc1c0
Compare
a9bc1c0 to
e12d69e
Compare
mkannwischer
requested changes
Dec 27, 2025
Contributor
mkannwischer
left a comment
There was a problem hiding this comment.
Thanks @hanno-becker for also adding it to the CI. One more nit, then this is good to merge.
Tests that the toplevel API correctly handles allocation failures by: - Returning MLD_ERR_OUT_OF_MEMORY on allocation failure - Cleaning up all allocated memory (no leaks) - Freeing in LIFO order (enabling bump allocator use) Uses custom bump allocator with LIFO tracking to systematically inject failures at each allocation point and verify error handling. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
e12d69e to
0680d22
Compare
0680d22 to
a2d900d
Compare
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
a2d900d to
888efaf
Compare
mkannwischer
approved these changes
Dec 28, 2025
Contributor
mkannwischer
left a comment
There was a problem hiding this comment.
Thanks @hanno-becker!
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.
Uh oh!
There was an error while loading. Please reload this page.