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

Anthony Ramine <[email protected]>
Newsgroups gmane.comp.lang.erlang.bugs,gmane.comp.lang.erlang.patches
Message-ID <[email protected]>
Amended the commit to fix a bug when folding over receive clauses.

Please refetch.

-- 
Anthony Ramine

Le 1 déc. 2013 à 13:21, Anthony Ramine <[email protected]> a écrit :

> A PR was created by Henrik, it may as well be announced here…:
> 
> 	https://github.com/erlang/otp/pull/150
> 
> -- 
> Anthony Ramine
> 
> Le 16 nov. 2013 à 13:58, Anthony Ramine <[email protected]> a écrit :
> 
>> 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-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
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.