Compiler crash report

Peter-Henry Mander erlang@REDACTED
Thu Jan 27 11:52:26 CET 2005


Hi Gurus,

I managed to isolate a non-critical compilation crash report.
When compiling the following code: 

---- BEGIN ----

-module(compiler_error).

-export([test/0]).

test() ->
   URI_Before =
   {absoluteURI,
      {scheme,fun() -> nil end},
      {'hier-part',
         {'net-path',
            {srvr,
               {userinfo,nil},
               fun() -> nil end},
            nil},
         {'query',nil}}},

   {absoluteURI,
      {scheme,_},
      {'hier-part',
         {'net-path',
            {srvr,
               {userinfo,nil},
               HostportBefore},
            nil},
         {'query',nil}}} = URI_Before,

   %% ... some funky code ommitted, not relevant ...

   {absoluteURI,
      {scheme,_},
      {'hier-part',
         {'net-path',
            {srvr,
               {userinfo,nil},
               HostportAfter},
            nil},
         {'query',nil}}} = URI_Before,
   %% NOTE: I intended to write URI_After instead of URI_Before
   %% but the accident revealed that when you add the line below,
   %% it causes internal error in v3_codegen on compilation
   {hostport,{hostname,"HostName"},{port,nil}} = HostportAfter,

   ok.


---- END ----

I get this output:

12> c(compiler_error).
./compiler_error.erl:none: internal error in v3_codegen;
crash reason: {{case_clause,{'EXIT',{function_clause,
                                        [{v3_codegen,
                                             fetch_reg,
                                             ['HostportAfter',[]]},
                                         {v3_codegen,move_unsaved,4},
                                         {v3_codegen,cg_call_args,4},
                                         {v3_codegen,cg_setup_call,4},
                                         {v3_codegen,bif_cg,7},
                                         {v3_codegen,
                                             '-cg_list/5-anonymous-0-',
                                             3},
                                         {v3_codegen,flatmapfoldl,3},
                                         {v3_codegen,flatmapfoldl,3},
                                         {v3_codegen,cg_list,5},
                                         {v3_codegen,cg_block,5}]}}},
               [{compile,'-select_passes/2-anonymous-2-',2},
                {compile,'-internal_comp/4-anonymous-1-',2},
                {compile,fold_comp,3},
                {compile,internal_comp,4},
                {compile,internal,3}]}
./compiler_error.erl:23: Warning: variable 'HostportBefore' is unused
error


Pete.

-- 
"The Tao of Programming
 flows far away 
 and returns 
 on the wind of morning."




More information about the erlang-questions mailing list