Skip to content

JIT: Fix missing untag of BSBinaryReg in do_get_tail#2177

Closed
pguyot wants to merge 1 commit intoatomvm:mainfrom
pguyot:w11/fix-do_get_tail-missing-untag
Closed

JIT: Fix missing untag of BSBinaryReg in do_get_tail#2177
pguyot wants to merge 1 commit intoatomvm:mainfrom
pguyot:w11/fix-do_get_tail-missing-untag

Conversation

@pguyot
Copy link
Collaborator

@pguyot pguyot commented Mar 10, 2026

BSBinaryReg holds a tagged binary term (from match state element 1). In do_get_tail, it was used directly as a base pointer in get_array_element, causing ldr to use an address offset by the tag bits (TERM_PRIMARY_BOXED = 0x02).

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

BSBinaryReg holds a tagged binary term (from match state element 1).
In do_get_tail, it was used directly as a base pointer in
get_array_element, causing ldr to use an address offset by the tag
bits (TERM_PRIMARY_BOXED = 0x02).

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
@pguyot pguyot closed this Mar 10, 2026
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