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] hang on small testcase #6578

Closed
RobinMorisset opened this issue Dec 19, 2022 · 2 comments · Fixed by #6582
Closed

[erlc] hang on small testcase #6578

RobinMorisset opened this issue Dec 19, 2022 · 2 comments · Fixed by #6582
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@RobinMorisset
Copy link
Contributor

On master (whether cherry-picking #6559 and #6575 or not), running erlc on the following testcase:

f(X) ->
    <<
        0
     || ((+(is_alive())) <
            [
                f(f(0))
             || X
            ]) andalso ok
    >>.

does not terminate even after 3 minutes (I've not waited longer, so it is possible that erlc is merely extremely slow and not completely stuck here). Usually, even programs several order of magnitude larger are compiled in seconds at the very most. And reducing this testcase even a tiny bit makes erlc compile it near-instantly.

@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Dec 19, 2022
@bjorng bjorng added the team:VM Assigned to OTP team VM label Dec 19, 2022
@bjorng bjorng self-assigned this Dec 19, 2022
@bjorng
Copy link
Contributor

bjorng commented Dec 19, 2022

The compiler is stuck forever in the type optimization pass, never reaching a fixpoint.

bjorng added a commit to bjorng/otp that referenced this issue Dec 19, 2022
bjorng added a commit to bjorng/otp that referenced this issue Dec 19, 2022
…master/primary_preloaded

* bjorn/compiler/beam_ssa_type/erlangGH-6578:
  Prevent the compiler from hanging
@jhogberg
Copy link
Contributor

Thanks for your report, I'm closing this as a duplicate of #6568 as they have the same cause.

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
3 participants