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

Fix binary pattern matching with OTP-21 compiled code #1178

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

bettio
Copy link
Collaborator

@bettio bettio commented Jun 4, 2024

Binary pattern matching was not working properly due to a bug in bs_context_to_binary implementation.

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

The implementation was using the wrong offset in certain situations,
leading to a wrong match.
Restore the offset from saved one, as in OTP.

Signed-off-by: Davide Bettio <davide@uninstall.it>
@bettio bettio force-pushed the fix-bs_context_to_binary-bug branch from c3f42ab to da5b7ae Compare June 5, 2024 20:19
@bettio bettio merged commit 93308d7 into atomvm:release-0.6 Jun 5, 2024
81 of 84 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.

1 participant