Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erl compare ext lists bug (ERL-705) #1929

Merged
merged 2 commits into from
Sep 4, 2018

Conversation

dotsimon
Copy link
Contributor

erl_compare_ext() eventually calls cmp_exe2() for compound terms, and that function doesn't consider the tail for lists.
This means erl_compare_ext() considers the external representation of these two terms to be equal:

[a|b]
[a|c]

But it gets worse! These terms are also considered equal:

{<<1,2,3>>, [901,902], 224}
{<<1,2,3>>, [901,902], 228}

The comparison did not consider the list tail and therefore
would consider the following pairs of terms equal:
{<<1,2,3>>, [901,902], 224} and {<<1,2,3>>, [901,902], 228}
{a|b} and {a|c}
@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Aug 20, 2018
@rickard-green rickard-green added the testing currently being tested, tag is used by OTP internal CI label Aug 27, 2018
@sverker sverker self-assigned this Sep 4, 2018
@sverker sverker merged commit e3e013e into erlang:maint Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants