[erlang-patches] sys_core_fold forgets about aliases when marking bit string variables for context reusing
Anthony Ramine
n.oxyde@REDACTED
Sun Dec 1 14:37:35 CET 2013
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 <n.oxyde@REDACTED> 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 <n.oxyde@REDACTED> 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 <n.oxyde@REDACTED> 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
>>>
>>
>
More information about the erlang-patches
mailing list