compiler bug in R10B-5

Fredrik Thulin ft@REDACTED
Fri Jun 17 11:28:09 CEST 2005


Hi

A friend of mine found this to me unexplainable compiler bug. It would 
be interesting to hear a few words about the cause, besides getting it 
fixed ;)

$ /pkg/erlang/R10B-5/bin/erlc bug.erl
Function pstnproxy_add_headers/2 refers to undefined label 6
./bug.erl:none: internal error in beam_clean;
crash reason: {{case_clause,{'EXIT',{undefined_label,6}}},
               [{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}]}
$

Trevlig helg / have a nice weekend

/Fredrik
-------------- next part --------------
-module(bug).

-export([pstnproxy_add_headers/2]).

-record(request, {
	  header
	 }).


-record(siporigin, {
	  proto
	 }).


pstnproxy_add_headers(Request, Origin) when is_record(Request, request),
                                            is_record(Origin, siporigin) ->
    NewHeaders1 = Request#request.header,
    NewHeaders2 =
        case (Origin#siporigin.proto == tls) or (Origin#siporigin.proto == tls6) of
            true ->
		keylist:delete("X-Foo2", NewHeaders1);
	    false ->
                keylist:delete("X-Foo2", NewHeaders1)
        end,
    NewHeaders3 =
      case (Origin#siporigin.proto == tls) or (Origin#siporigin.proto == tls6) of
          true ->
              keylist:delete("X-Foo3", NewHeaders2);
          false ->
              keylist:delete("X-Foo3", NewHeaders2)
      end,
    Request#request{header = NewHeaders3}.


More information about the erlang-bugs mailing list