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

ERL-778: Internal consistency check failed - uninitialized register #3998

Closed
OTP-Maintainer opened this issue Nov 20, 2018 · 1 comment
Closed
Assignees
Labels
bug Issue is reported as a bug priority:low team:VM Assigned to OTP team VM
Milestone

Comments

@OTP-Maintainer
Copy link

Original reporter: emfa
Affected version: OTP-21.1.1
Fixed in version: OTP-21.2
Component: compiler
Migrated from: https://bugs.erlang.org/browse/ERL-778


When trying to compile our project with 21 for the first time I got an error and was told to report this. I tried to de still the function to the smallest possible which still failed. Have not had time to do any more digging.


{code:erlang}
-module(test).

-export([test/2]).

test(F, M) ->
    NewValue = case is_function(F, 0) of
                true -> F();
                false when F =:= undefined -> undefined
            end,
    case NewValue of
        undefined -> undefined;
        _ -> M#{test => NewValue}
    end.
{code}


{noformat}
emfa >> erlc /tmp/test.erl
test: function test/2+6:
  Internal consistency check failed - please report this bug.
  Instruction: {bif,is_function,{f,0},[{x,0},{integer,0}],{x,2}}
  Error:       {uninitialized_reg,{y,0}}:
{noformat}
@OTP-Maintainer
Copy link
Author

bjorn said:

Thanks for the bug report.

Here is a fix:

https://github.com/erlang/otp/pull/2025

The correction will be included in OTP 21.2.

@OTP-Maintainer OTP-Maintainer added bug Issue is reported as a bug team:VM Assigned to OTP team VM priority:low labels Feb 10, 2021
@OTP-Maintainer OTP-Maintainer added this to the OTP-21.2 milestone Feb 10, 2021
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 priority:low team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

2 participants