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 two bit syntax bugs when running OTP-24 compiled code with the AArch64 JIT #8248

Merged

Commits on Mar 11, 2024

  1. AArch64: Fix incorrect result for running code compiled by OTP 24

    On AArch64, when constructing a binary using the bit syntax, using a
    unit greater than 16 and not being a power of two would, would cause
    erroneous results. For example, given this module compiled with
    Erlang/OTP 24:
    
        -module(t).
        -export([bar/2]).
    
        bar(Contents, Size) ->
            <<Contents:Size/unit:31>>.
    
    only the first two bytes would be correctly set:
    
        1> t:bar(-1, 1).
        <<255,255,0,0:7>>
        2> t:bar(-1, 1).
        <<255,255,149,35:7>>
        3> t:bar(-1, 1).
        <<255,255,0,0:7>>
        4> t:bar(-1, 1).
        <<255,255,3,0:7>>
    bjorng committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    8508cef View commit details
    Browse the repository at this point in the history
  2. AArch64: Fix crash for running bit syntax code compiled by OTP 24

    This bug was introduced in 67c52b6.
    
    Closes erlang#8238
    bjorng committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    3ab2cc6 View commit details
    Browse the repository at this point in the history