R10B-4 compiler bug with two try/catch

Fredrik Thulin ft@REDACTED
Fri Apr 15 11:10:05 CEST 2005


Hi

The attached file cause the following error on R10B-4 :

$ /pkg/erlang/R10B-4/bin/erlc sipparse_util.erl
sipparse_util: function test/0+34:
  Internal consistency check failed - please report this bug.
  Instruction: {try_end,{y,0}}
  Error:       unknown_catch_try_state:

$   

/Fredrik
-------------- next part --------------
-module(sipparse_util).
%%-compile(export_all).

-export([test/0]).

split_quoted_string([34 | _Rest]) ->	%% 34 is '"'
    ok.

test() ->
    %% does not start with quote
    io:format("test: split_quoted_string/1 - 5~n"),
    try split_quoted_string("foo \"bar\"") of
	SQS_Res5 -> throw({error, test_case_failed, SQS_Res5})
    catch
	error: does_not_start_with_quote -> ok
    end,

    %% no ending quote
    io:format("test: split_quoted_string/1 - 6~n"),
    try split_quoted_string("\"foo ") of
	SQS_Res6 -> throw({error, test_case_failed, SQS_Res6})
    catch
	error: no_end_quote -> ok
    end,

    ok.




More information about the erlang-bugs mailing list