[erlang-bugs] Internal consistency check failed during pattern matching with binary

Viktor Sovietov <>
Wed Dec 26 15:17:33 CET 2012


Hello!

The following piece of code (purely synthetic):

    -module(check).
    -export([check/2]).

    check(<<"string">>, a1) ->
         one;
    check(_, a2) ->
         two;
    check(undefined, a3) ->
         three.

produces failure of internal cosistency instead of simple warning:

-----------

Erlang R15B02 (erts-5.9.2) [source] [smp:2:2] [async-threads:0] [hipe]
[kernel-poll:false]

Eshell V5.9.2  (abort with ^G)
1> c(check).
check: function check/2+17:
  Internal consistency check failed - please report this bug.
  Instruction: {test,is_eq_exact,{f,7},[{x,0},{atom,undefined}]}
  Error:       {match_context,{x,0}}:

error

-----------

It's probably a bug in pattern matcher. Being wrapped in case … of it gives
the same result.


-- 
Sincerely,

Viktor Sovietov
Cloudozer LLP
tel: +44 845 5086137
Skype: owlbird
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20121226/6eafa203/attachment.html>


More information about the erlang-bugs mailing list