R10B-5 compiler bug with two try/catch

Bjorn Gustavsson <>
Thu May 12 11:52:37 CEST 2005


I can't seem to find your previous email. When did you send it?

Anyway, I have written a ticket about the problem and expect to fix
it in R10B-6.

/Björn

Fredrik Thulin <> writes:

> 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 <>
> To: 
> 
> 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
> 
> -------------------------------------------------------
> 
> -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.
> 
> 

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list