[erlang-bugs] bug in bs_put_integer

Bjorn Gustavsson bjorn@REDACTED
Thu Dec 20 11:33:23 CET 2007


"Fredrik Svahn" <fredrik.svahn@REDACTED> writes:

> Seems similar to the bug reported by Oleg Avdeev on Dec 7, although it does
> not seem like the patch provided then solves this problem. Program compiles
> with R11B-5 but not with R12B-0.

Thanks!

Yes, a similar bug. I did look for more bugs when I prepared that patch, but
I didn't realize that bs_put_integer could be passed a binary.

We will correct the problem in R12B-1. Since the program will fail at run-time,
I suppose that I don't need to post a patch.

/Bjorn

> Problem:
> ---------
> 
> $ erlc test2.erl
> test2: function f/1+10:
>   Internal consistency check failed - please report this bug.
>   Instruction: {bs_put_integer,{f,0},
>                                {integer,8},
>                                1,
>                                {field_flags,[unsigned,big]},
>                                {x,0}}
>   Error:       {match_context,{x,0}}:
> 
> 
> Test program:
> --------------
> -module(test2).
> -export([f/1]).
> 
> f(<<"A", H/binary>>) -> <<"B", H>>.
> 
> 
> BR /Fredrik Svahn
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-bugs

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



More information about the erlang-bugs mailing list