[erlang-bugs] Internal consistency check failed in compiler
Justin T. Sampson
justin@REDACTED
Sun Apr 6 17:23:03 CEST 2008
Okay, cool. I figured out that it also compiles fine if I replace
every occurrence of <<Rest/binary>> with just Rest.
Cheers,
Justin
On Sat, Apr 5, 2008 at 7:26 PM, Matthew Dempsky <matthew@REDACTED> wrote:
> This compiles fine for me using R12B-1 on OS X 10.5.2.
>
> On Sat, Apr 5, 2008 at 11:06 AM, Justin T. Sampson <justin@REDACTED> wrote:
>
> > Using R12B-0 on Mac OS X 10.4.11...
> >
> > $ erlc bug_test.erl
> > bug_test: function process/2+25:
> > Internal consistency check failed - please report this bug.
> > Instruction: {bs_append,{f,0},
> > {integer,0},
> > 0,2,8,
> > {x,0},
> > {field_flags,[]},
> > {x,2}}
> > Error: {match_context,{x,0}}:
> >
> > ===== bug_test.erl =====
> > -module(bug_test).
> > -compile(export_all).
> >
> > escape_char($<) ->
> > <<"<">>;
> > escape_char($>) ->
> > <<">">>;
> > escape_char($&) ->
> > <<"&">>;
> > escape_char(C) when C =:= $\t; C =:= $\r; C =:= $\n; C >= $\s, C =< $~ ->
> > <<C>>;
> > escape_char(C) when C >= 128 ->
> > <<"&#", (list_to_binary(integer_to_list(C)))/binary, ";">>.
> >
> > process(<<>>, SoFar) ->
> > SoFar;
> > process(<<"\r\n", Rest/binary>>, SoFar) ->
> > process(Rest, <<SoFar/binary, "<br />\n">>);
> > process(<<"\r", Rest/binary>>, SoFar) ->
> > process(Rest, <<SoFar/binary, "<br />\n">>);
> > process(<<"\n", Rest/binary>>, SoFar) ->
> > process(Rest, <<SoFar/binary, "<br />\n">>);
> > process(<<" ", Rest/binary>>, SoFar) ->
> > process(<<" ", Rest/binary>>, <<SoFar/binary, " ">>);
> > process(<<" ", Rest/binary>>, SoFar) ->
> > process(<<Rest/binary>>, <<SoFar/binary, " ">>);
> > process(<<"\t", Rest/binary>>, SoFar) ->
> > process(<<Rest/binary>>, <<SoFar/binary, " ">>);
> > process(<<"----\r\n", Rest/binary>>, SoFar) ->
> > process(<<Rest/binary>>, <<SoFar/binary, "<hr />\n">>);
> > process(<<"----\r", Rest/binary>>, SoFar) ->
> > process(<<Rest/binary>>, <<SoFar/binary, "<hr />\n">>);
> > process(<<"----\n", Rest/binary>>, SoFar) ->
> > process(<<Rest/binary>>, <<SoFar/binary, "<hr />\n">>);
> > process(<<C, Rest/binary>>, SoFar) ->
> > process(Rest, <<SoFar/binary, (escape_char(C))/binary>>).
> > ===== end bug_test.erl =====
> > _______________________________________________
> > erlang-bugs mailing list
> > erlang-bugs@REDACTED
> > http://www.erlang.org/mailman/listinfo/erlang-bugs
More information about the erlang-bugs
mailing list