[erlang-questions] [erlang-bugs] R12B-0 Compiler issues

Chih - Wei Yu [ MTN - Innovation Centre ] <>
Wed Jan 16 09:28:59 CET 2008


Hi Bjorn,

Thank you for your response, I'll try the patch and see I can recompile the modules.

Regards,
Chih-Wei Yu

-----Original Message-----
From:  [mailto:] On Behalf Of Bjorn Gustavsson
Sent: Tuesday, January 15, 2008 5:25 PM
To: ; 
Subject: Re: [erlang-bugs] R12B-0 Compiler issues

"Chih - Wei  Yu [ MTN - Innovation Centre ]" <> writes:

> I've provided the code that is reporting the error when compiling. I did
> see other 'similar' issues raised but would like to raise it again.
> [Code]
> 
> encode_octet_string( <<OctetString/binary>>, Len ) ->
> <<OctetString:Len/binary-unit:8>>;  % The compiler reports an error for
> this line of code 
> 
> encode_octet_string( [H|T], Len )
> 
> ->
> 
>     B  = list_to_binary( [H|T] ), 
> 
>     << B:Len/binary-unit:8>>
> % However, for this line of code it does not report an error.
> 
> ;
> 
> encode_octet_string( _ANY, _ ) -> <<>>.
> 

Thanks for the new test case. Bjorn's law - "If it isn't tested,
it doesn't work" - has again been proved. :-)

Your other code example is not complete, so I haven't verified, but
it seems to be the same bug that I have already fixed.

The attached patch should fix all found bugs in beam_bsm.erl. It
should be applied to the unchanged beam_bsm.erl in R12B-0. 

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

NOTE: This e-mail message is subject to the MTN Group disclaimer see http://www.mtn.co.za/default.aspx?pid=34411 



More information about the erlang-questions mailing list