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 #6501

Closed
ilya-klyuchnikov opened this issue Nov 23, 2022 · 0 comments · Fixed by #6502
Closed

erlc crash #6501

ilya-klyuchnikov opened this issue Nov 23, 2022 · 0 comments · Fixed by #6502
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Milestone

Comments

@ilya-klyuchnikov
Copy link
Contributor

Describe the bug
erlc crashes

To Reproduce

-module(crash).

-export([foo/1]).

-record(foo, {bar = [Bar || Bar <- foo:bar(), size(Bar) > 0]}).

foo(Bar) -> [Bar || #foo{}].
erlc crash.erl
crash.erl: internal error in pass expand_records:
exception error: no match of right hand side value true
  in function  erl_expand_records:in_guard/1 (erl_expand_records.erl, line 202)
  in call from erl_expand_records:lc_tq/3 (erl_expand_records.erl, line 525)
  in call from erl_expand_records:lc_tq/3 (erl_expand_records.erl, line 507)
  in call from erl_expand_records:expr/2 (erl_expand_records.erl, line 283)
  in call from erl_expand_records:expr_list/2 (erl_expand_records.erl, line 446)
  in call from erl_expand_records:expr_list/2 (erl_expand_records.erl, line 447)
  in call from erl_expand_records:expr/2 (erl_expand_records.erl, line 291)
  in call from erl_expand_records:'-guard_test/2-fun-0-'/2 (erl_expand_records.erl, line 172)

Expected behavior
no crash

Affected versions
25.1, master

@ilya-klyuchnikov ilya-klyuchnikov added the bug Issue is reported as a bug label Nov 23, 2022
@bjorng bjorng self-assigned this Nov 24, 2022
@bjorng bjorng added the team:VM Assigned to OTP team VM label Nov 24, 2022
bjorng added a commit to bjorng/otp that referenced this issue Nov 24, 2022
@bjorng bjorng linked a pull request Nov 24, 2022 that will close this issue
@bjorng bjorng added this to the OTP-25.2 milestone Nov 24, 2022
bjorng added a commit to bjorng/otp that referenced this issue Nov 26, 2022
bjorng added a commit that referenced this issue Nov 28, 2022
…OTP-18336

Fix compiler crash when using a record as LC filter
@bjorng bjorng closed this as completed Nov 28, 2022
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.

2 participants