[erlang-bugs] R12B-0 Compiler issues

Chih - Wei Yu [ MTN - Innovation Centre ] yu_c@REDACTED
Tue Jan 15 11:53:29 CET 2008


Hi,

 

I'm having some issues when compiling code in R12B-0. Its reporting
internal consistency check failed. I can compile the code in R11B-5. 

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.

Thanks.

 

[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, _ ) -> <<>>.

 

 

[compiler error]

(test@REDACTED)8> c("../../../../projects/src/smpp_types").

smpp_types: function encode_octet_string/2+9:

  Internal consistency check failed - please report this bug.

  Instruction: {bs_put_binary,{f,0},

                              {x,1},

                              8,

                              {field_flags,[unsigned,big]},

                              {x,0}}

  Error:       {match_context,{x,0}}:

 

------------------------------------------------------------------------
-------------------------------------------------------------

Another piece of code

 

[Code]

    <<A:8,  R8/binary>>        = R7,

    <<B:8,  R9/binary>>        = R8,

    

    {C, <<_R10/binary>>} = if

 

        A > 0  ->  decode_octet_string( A, R9 );

 

        true

        ->

            <<_NIL:8, R9x/binary>> = R9,                       % The
compiler reports an error for this line of code 

            {[], <<R9x/binary>>}

    end,

 

[Compiler error]

Internal consistency check failed - please report this bug.

  Instruction: {bs_append,{f,0},

                          {integer,0},

                          0,5,8,

                          {x,3},

                          {field_flags,[]},

                          {x,5}}

  Error:       {match_context,{x,3}}:

 

Regards,

Chih-Wei Yu

 

NOTE: This e-mail message is subject to the MTN Group disclaimer see http://www.mtn.co.za/default.aspx?pid=34411 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20080115/d7fbdb60/attachment.htm>


More information about the erlang-bugs mailing list