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

bug(gnovm): Incorrect pointer comparison #2624

Closed
deelawn opened this issue Jul 23, 2024 · 0 comments · Fixed by #2627
Closed

bug(gnovm): Incorrect pointer comparison #2624

deelawn opened this issue Jul 23, 2024 · 0 comments · Fixed by #2627
Assignees

Comments

@deelawn
Copy link
Contributor

deelawn commented Jul 23, 2024

Incorrect pointer comparison

Description

When comparing two interfaces with underlying pointer types, they should only evaluate to true if both the types and the values are equal. In gno, the comparison seems not to consider the pointer type and evaluates to true as long as the "address" is the same.

In go: https://goplay.tools/snippet/zgyu54FGKk6
In gno: https://play.gno.land/p/QmBygigR1_h

@petar-dambovaliev petar-dambovaliev self-assigned this Jul 24, 2024
thehowl pushed a commit that referenced this issue Jul 29, 2024
fixes [this](#2624)

When comparing 2 upcasted pointers, if the types are not the same, they
are not equal.

---------

Co-authored-by: deelawn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants