[erlang-questions] Compiler Crash and Bug?

Ulf Wiger (TN/EAB) ulf.wiger@REDACTED
Fri Nov 3 11:42:23 CET 2006


So, specifically, the LHS of the pattern match is too complex?

I made a quick attempt to break out some of the 
common hard-coded strings and bind them to variables.
That seemed to be enough to make it compile.

e.g.


f() ->
    X123456 = "123456",
    Surname = "Surname",
    [{emr_user,<<85,115,101,114,49>>,1,1,"Parent Company User",
      Surname,1235467890123,"password",12345,X123456,true, 
      0,{{2006,1,1},{10,12,25}},{{2006,2,1},{10,12,25}},X123456,
      "First address line","Second Address line","Third address line",
      "City",123},
     {emr_user,<<85,115,101,114,50>>,2,2,"Second Company User",
      Surname,3215467890123,"password",12345,X123456,true, 
      0,{{2006,1,1},{10,12,25}},{{2006,2,1},{10,12,25}},"123456",
      "First address line","Second Address line","Third address line",
      "City",123},
     {emr_user,<<85,115,101,114,51>>,3,3,"Third Company User",
      Surname,2315467890123,"password",12345,X123456,true, 
      0,{{2006,1,1},{10,12,25}},{{2006,2,1},{10,12,25}},X123456,
      "First address line","Second Address line","Third address line",
      "City",123},
     {emr_user,<<85,115,101,114,52>>,4,4,"Second Company's Child User",
      Surname,1115467890123,"password",12345,X123456,true,0,
      {{2006,1,1},{10,12,25}},{{2006,2,1},{10,12,25}},X123456,
      "First address line","Second Address line","Third address line",
      "City",123}] =
        emr_api:listall_sub_users(list_to_binary("administrator")).

BR,
Ulf W


> -----Original Message-----
> From: erlang-questions-bounces@REDACTED 
> [mailto:erlang-questions-bounces@REDACTED] On Behalf Of 
> Bjorn Gustavsson
> Sent: den 3 november 2006 05:29
> To: erlang-questions@REDACTED
> Subject: Re: [erlang-questions] Compiler Crash and Bug?
> 
> R11B-1 gives you a clearer error message:
> 
> emr_api_SUITE: function test_listall_sub_users/1+1659:
>   An implementation limit was reached.
>   Try reducing the complexity of this function.
> 
>   Instruction: {get_list,{x,1022},{x,1023},{x,1024}}
> 
> /Bjorn
> 
> Rudolph van Graan <rvg@REDACTED> writes:
> 
> > Hi there,
> > 
> > The following code causes the compiler (R10B-10) to crash and to go 
> > into an infinite loop (R10B-3) like this:
> > 
> > emr_api_SUITE: function test_listall_sub_users/1+4267:
> >    Internal consistency check failed - please report this bug.
> >    Instruction: {get_list,{x,1022},{x,1023},{x,1024}}
> >    Error:       {invalid_store,{x,1024},term}:
> > 
> > 
> > test_listall_sub_users(doc) ->
> >    ["Test api's listall for sub users"];
> > test_listall_sub_users(suite) ->
> >    [];
> > test_listall_sub_users(_Config) ->
> >    [{emr_user,<<85,115,101,114,49>>,1,1,"Parent Company  
> > User"        
> ,"Surname",1235467890123,"password",12345,"123456",true, 
> > 0,{{2006,1,1},{10,12,25}},{{2006,2,1},{10,12,25}},"123456","First
> > address line","Second Address line","Third address 
> line","City",123},
> >     {emr_user,<<85,115,101,114,50>>,2,2,"Second Company  
> > User"        
> ,"Surname",3215467890123,"password",12345,"123456",true, 
> > 0,{{2006,1,1},{10,12,25}},{{2006,2,1},{10,12,25}},"123456","First
> > address line","Second Address line","Third address 
> line","City",123},
> >     {emr_user,<<85,115,101,114,51>>,3,3,"Third Company  
> > User"         
> ,"Surname",2315467890123,"password",12345,"123456",true, 
> > 0,{{2006,1,1},{10,12,25}},{{2006,2,1},{10,12,25}},"123456","First
> > address line","Second Address line","Third address 
> line","City",123},
> >     {emr_user,<<85,115,101,114,52>>,4,4,"Second Company's Child 
> > User","Surname",1115467890123,"password",12345,"123456",true,0,
> > {{2006,1,1},{10,12,25}},{{2006,2,1},{10,12,25}},"123456","First
> > address line","Second Address line","Third address line","City",
> >      123}] = 
> emr_api:listall_sub_users(list_to_binary("administrator")),
> >    ok.
> > 
> > is this a known issue?
> > 
> > Regards,
> > 
> > Rudolph
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> > 
> 
> --
> Björn Gustavsson, Erlang/OTP, Ericsson AB
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 




More information about the erlang-questions mailing list