Skip to content

Conversation

@pguyot
Copy link
Collaborator

@pguyot pguyot commented Nov 26, 2025

When a binary is small enough to be on heap and private_append is used for binary construction, a new binary is created and it needs to be zero'd if further binary construction instructions only set bits.

Fixes #2003

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

When a binary is small enough to be on heap and private_append is used for
binary construction, a new binary is created and it needs to be zero'd if
further binary construction instructions only set bits.

Fixes atomvm#2003

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
@pguyot pguyot force-pushed the w48/fix-private_append-corruption branch from 844d2a1 to 635f2dc Compare November 26, 2025 21:33
@pguyot pguyot marked this pull request as ready for review November 26, 2025 21:33
@bettio bettio merged commit 80d41d8 into atomvm:main Nov 27, 2025
191 of 195 checks passed
@pguyot pguyot deleted the w48/fix-private_append-corruption branch November 29, 2025 05:43
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.

Binary construction produces incorrect result

2 participants