R10B-5 compiler bug with two try/catch

Fredrik Thulin ft@REDACTED
Thu May 12 09:36:46 CEST 2005


Hi

This bug is not fixed in R10B-5, posting to erlang-questions too as it 
did not result in any feedback on the erlang-bugs list.

$ /pkg/erlang/R10B-5/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

PS. The documented return value of timer:now_diff/2 has an obvious 
copy/paste error :

	now_diff(T2, T1) -> {Time, Value} 




----------  Forwarded Message  ----------

Subject: R10B-4 compiler bug with two try/catch
Date: Friday 15 April 2005 11.10
From: Fredrik Thulin <ft@REDACTED>
To: erlang-bugs@REDACTED

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