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

The TestEquality instance for LLVMPointer is suspicious #458

Closed
travitch opened this issue Mar 10, 2020 · 2 comments
Closed

The TestEquality instance for LLVMPointer is suspicious #458

travitch opened this issue Mar 10, 2020 · 2 comments
Labels

Comments

@travitch
Copy link
Contributor

The TestEquality instance for LLVMPointer returns true if the inputs are the same width, with no additional checks:

instance IsExprBuilder sym => TestEquality (LLVMPointer sym) where

This seems unsafe and uses of this instance should probably just be testing the width reprs explicitly.

@travitch travitch added the llvm label Mar 10, 2020
@robdockins
Copy link
Contributor

Agreed. The contract for TestEquality is ambiguous at best, but we're pretty uniformly using it as a value equality check, and not just a type equality check.

@langston-barrett
Copy link
Contributor

Here's the issue that appears to be tracking/discussing the ambiguity: GaloisInc/parameterized-utils#63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants