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

[erlc] crash with "binary_alloc: Cannot allocate 103079215152 bytes of memory" #6643

Closed
RobinMorisset opened this issue Jan 9, 2023 · 0 comments · Fixed by #6644
Closed
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@RobinMorisset
Copy link
Contributor

The following code is invalid Erlang code (since the documentation says "For a segment of type float the size must be either 64, 32, or 16"), but I would have expected either a runtime exception or the program being rejected.

f(#{(<<0:8589934596/float-unit:96>>) := _}) ->
    ok.

Instead it causes erlc to crash with

binary_alloc: Cannot allocate 103079215152 bytes of memory (of type "binary").

This happens on master.

@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Jan 9, 2023
@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Jan 9, 2023
@jhogberg jhogberg self-assigned this Jan 9, 2023
jhogberg added a commit that referenced this issue Jan 10, 2023
…-crash/GH-6643

beam_ssa_opt: Don't optimize constants larger than 1<<24 bits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants