You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix JIT bs_get_binary2 with compile-time integer size
In OP_BS_GET_BINARY2, `Size` from decode_compact_term is a tagged term
integer ((N bsl 4) bor 0xF). The code used `Size bsl 4` which shifts
the already-tagged value further left, producing a garbage value.
The correct operation is `Size bsr 4` to untag and get the raw byte
count, matching what the non-JIT interpreter does with term_to_int().
This bug caused bs_get_binary2 with a compile-time literal size to
always fail the bounds check, making patterns like
<<Head:N/binary, Rest/binary>> (with literal N) unmatchable.
Also add a test for the atom all case using assembly and fix subq on x86_64
with large integers following what other backends do.
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
0 commit comments