Compiler will get segmentation fault for some kinds of `when` clauses on function
tatsuya6502 opened this issue · comments
The following valid Erlang code will cause the Firefly compiler to get segmentation fault:
-module(init).
-export([boot/1]).
boot(_Args) -> ok.
a(X) when X rem 10 == 0 ->
ok.
b(Y) when Y div 10 > 2 ->
ok.
$ firefly compile -C no_default_init --bin init.erl
Compiling init.erl
zsh: segmentation fault firefly compile -C no_default_init --bin init.erl
Environment
- Firefly: develop branch, commit: 323e0ca6 (Sep 12, 2022 UTC)
- macOS Monterey 12.6 (arm64)
- Rust: nightly-2022-08-08
- LLVM: firefly-15.0.0-dev_2022-08-27/clang+llvm-15.0.0-arm64-apple-darwin21.6.0.tar.gz
Fixed in develop