Skip to content

LFE fails to run all tests on Erlang 22 #386

Closed

Description

@oubiwann

Error message during build:

test/guard_SUITE.lfe: function basic_andalso_orelse/1+29:
  Internal consistency check failed - please report this bug.
  Instruction: {get_tuple_element,{x,0},3,{x,0}}
  Error:       {bad_type,{needed,{tuple_element,4}},{actual,{tuple,[3],#{}}}}:
...
===> Hook for ct failed!

Activity

  1. rvirding commented on Oct 6, 2020

    @rvirding
    Member

    This works with Erlang 21 and 23 but not for 22. This is a weird one I don't know if I can fix as it is in the Erlang part.

  2. oubiwann commented on Oct 14, 2020

    @oubiwann
    MemberAuthor

    Gonna do some reading and take some notes here in this ticket. Maybe by the end of that, we'll have an idea of what to do :-)

  3. oubiwann commented on Oct 14, 2020

    @oubiwann
    MemberAuthor

    From http://blog.erlang.org/OTP-22-Highlights/:

    OTP 21:

        {test,is_tagged_tuple,{f,9},[{x,0},2,{atom,myrecord}]}.
        {get_tuple_element,{x,0},0,{x,1}}.
        {get_tuple_element,{x,0},1,{x,2}}.
        {gc_bif,'+',{f,0},3,[{x,2},{integer,1}],{x,0}}.
        {test_heap,3,1}.

    OTP 22:

        {get_tuple_element,{x,0},1,{x,0}}.
        {gc_bif,'+',{f,0},1,[{x,0},{integer,1}],{x,0}}.
        {test_heap,3,1}.

    The is_tagged_tuple instruction has been completely eliminated and as an added bonus one get_tuple_element was also removed.

  4. oubiwann commented on Oct 14, 2020

    @oubiwann
    MemberAuthor

    Through a process of trial and error, I found that the error in the test first occurs in this part of the let block:

         (line (test-pat 65 (case ()
                              (() (andalso (=:= (element 1 t) 'type)
                                           (=:= (tuple_size t) 4)
                                           (=:= (element 2 t) 'integers))
                               (+ (element 3 t) (element 4 t))))))

    To be honest, though ... I'm not even sure why that test is structured the way it is? Isn't (case () (() ...)) functionally identical to progn? Oh ... just took a look at the eif macro, and the test may be trying to establish a similarity with the case in that macro? Hard to read for me ...

  5. oubiwann commented on Oct 14, 2020

    @oubiwann
    MemberAuthor

    Okay, that PR I submitted (#412) comments out that one code block and the tests all pass now for all supported versions of Erlang.

  6. added this to the Backlog milestone on Nov 30, 2020
  7. modified the milestones: Backlog, 2.1 on Jun 7, 2021
  8. self-assigned this
    on Jun 7, 2021
  9. oubiwann commented on Jun 7, 2021

    @oubiwann
    MemberAuthor

    Now that we've got improved support for Erlang 19-21 and 22-24, I'm going to take another look at this ...

  10. oubiwann commented on Dec 29, 2022

    @oubiwann
    MemberAuthor

    Update: all tests are now passing!

    So this should be fixed ... (unless a test has been commented out somewhere?)

  11. modified the milestones: 2.1, 2.2 on Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions