[erlang-questions] [bug] beam_asm failure on invalid binary match
Will
wglozer@REDACTED
Fri Oct 3 19:20:00 CEST 2008
Hello,
I mistakenly set the size specifier in a binary match to zero and it caused
beam_asm to crash.
This is Erlang/OTP R12B-4.
Test case:
test3() ->
<<Len:16/little, Str:Len/binary, 0:0>> = <<2, 0, $h, $i, 0>>.
Result:
crash reason: {function_clause,[{beam_dict,old_string,[[],[]]},
{beam_dict,string,2},
{beam_asm,encode_arg,2},
{beam_asm,encode_op_1,3},
{beam_asm,assemble_function,3},
{beam_asm,assemble_1,4},
{beam_asm,assemble,4},
{beam_asm,module,4}]}
Thanks,
Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081003/66c5400b/attachment.htm>
More information about the erlang-questions
mailing list