Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-1212

Internal consistency check failed: OTP 22.3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: OTP 22.2, 22.3
    • Fix Version/s: None
    • Component/s: compiler
    • Labels:
      None

      Description

      I tried to narrow down the code to the problematic line(s).

       

      Compiler output:

       

      > erlc test.erl
      test: function apply_filters/3+16:
        Internal consistency check failed - please report this bug.
        Instruction: {get_hd,{y,2},{x,0}}
        Error:       {bad_type,{needed,cons},{actual,list}}:
      

       

       

      test.erl:

       

      -module(test).
      -compile(export_all).
      
      apply_filters(ItemId, Tpid, FilterList) ->
          NoFilters = (FilterList == []),
          OtherFilters = (length(FilterList) == 1),
          case filter_item_tpid(ItemId, Tpid, FilterList) of
              false when (NoFilters == true) ->
                  false;
              false when (OtherFilters == true) ->
                  case hd(FilterList) of
                      a -> true;
                      b -> false
                  end;
              ItemWithFilters ->
                  ItemWithFilters
          end.
      
      filter_item_tpid(_, _, _) ->
          false.

       

       Additional note: It's not giving this error on 23.0-rc2.

       

        Attachments

          Activity

            People

            Assignee:
            john John Högberg
            Reporter:
            srijan srijan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: