Re: sys_core_fold forgets about aliases when marking bit string variables for context reusing

Anthony Ramine <[email protected]>
Newsgroups gmane.comp.lang.erlang.patches,gmane.comp.lang.erlang.bugs
Message-ID <[email protected]>
Finally I may have found one.

Tell me where I should write tests for that and I will add them.

	git fetch https://github.com/nox/otp.git core-clause-subst

	https://github.com/nox/otp/compare/erlang:maint...core-clause-subst
	https://github.com/nox/otp/compare/erlang:maint...core-clause-subst.patch

Regards,

-- 
Anthony Ramine

Le 16 nov. 2013 à 13:27, Anthony Ramine <[email protected]> a écrit :

> Hello,
> 
> I have trying to fix a bug for a while without success so I post it here.
> 
> t(Bin1) ->
>    case Bin1 of
>        <<>> -> ok;
>        Bin2 ->
>            case Bin1 of
>                <<0>> -> ok;
>                _ -> Bin2
>            end
>    end.
> 
> In the following function, sys_core_fold fails to see that Bin2 is an alias of Bin1 and does not emit a bs_context_to_binary, making beam_validator crash quite violently:
> 
> t: function t/1+17:
>  Internal consistency check failed - please report this bug.
>  Instruction: return
>  Error:       {match_context,{x,0}}:
> 
> Regards,
> 
> -- 
> Anthony Ramine
> 

_______________________________________________
erlang-patches mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.