Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing out-of-memory handling in binary_to_atom #1535

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

bettio
Copy link
Collaborator

@bettio bettio commented Feb 14, 2025

Just check malloc return value.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@bettio bettio changed the base branch from main to release-0.6 February 14, 2025 00:17
Check malloc return value when allocating a new atom and raise error in
case of failed alloc.

Signed-off-by: Davide Bettio <[email protected]>
@bettio bettio force-pushed the add-missing-oom-binary_to_atom branch from 8ab048b to 3bfabb9 Compare February 14, 2025 00:17
Copy link
Collaborator

@UncleGrumpy UncleGrumpy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@bettio bettio merged commit b788578 into atomvm:release-0.6 Feb 14, 2025
96 of 102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants