Skip to content

Commit c1f7cd0

Browse files
committed
Add missing boxed integer allocation in OP_BS_GET_INTEGER2
This bug could potentially yield a crash with current memory implementation, however it was not observed. Signed-off-by: Paul Guyot <[email protected]>
1 parent 1950aaa commit c1f7cd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libAtomVM/opcodesswitch.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4757,9 +4757,9 @@ static bool maybe_call_native(Context *ctx, AtomString module_name, AtomString f
47574757
} else {
47584758
term_set_match_state_offset(src, bs_offset + increment);
47594759

4760-
term t = term_make_maybe_boxed_int64(ctx, value.s);
4760+
term t = maybe_alloc_boxed_integer_fragment(ctx, value.s);
47614761
if (UNLIKELY(term_is_invalid_term(t))) {
4762-
RAISE_ERROR(OUT_OF_MEMORY_ATOM);
4762+
HANDLE_ERROR();
47634763
}
47644764

47654765
WRITE_REGISTER(dreg_type, dreg, t);

0 commit comments

Comments
 (0)