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

compiler: Infer types through 'and' BIF #6559

Conversation

jhogberg
Copy link
Contributor

Fixes #6552. The corresponding change for 'or' requires a bit of refactoring and will be done in a later PR.

@jhogberg jhogberg added team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI bug Issue is reported as a bug labels Dec 15, 2022
@jhogberg jhogberg requested a review from bjorng December 15, 2022 10:44
@jhogberg jhogberg self-assigned this Dec 15, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 15, 2022

CT Test Results

       2 files     285 suites   12m 37s ⏱️
   748 tests    746 ✔️ 2 💤 0
4 629 runs  4 627 ✔️ 2 💤 0

Results for commit 4e353d5.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@RobinMorisset
Copy link
Contributor

This PR appears to trigger a bug on the following testcase:

f(X, X, (X = [_ | X])) when true; self() ->
    [0 || _ <- {X}].

it crashes erlc with the following error message:

  Internal consistency check failed - please report this bug.
  Instruction: {call_only,1,{f,7}}
  Error:       {bad_arg_type,{x,0},
                             {t_tuple,1,true,#{}},
                             {t_tuple,1,true,#{1 => {t_cons,any,any}}}}:

This does not reproduce on master without cherry-picking this PR.

Thanks @michalmuskala for teaching the fuzzer about more bifs, including self().

@jhogberg jhogberg force-pushed the john/compiler/infer-types-through-and-bif/GH-6552 branch from ad69541 to 4e353d5 Compare December 16, 2022 10:52
@jhogberg
Copy link
Contributor Author

Thanks, I've pushed up a fix. :-)

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 testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[erlc] Internal consistency check failed
3 participants