-
Notifications
You must be signed in to change notification settings - Fork 996
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-Candidate]: AssertionError
in ssa.py
#1372
Comments
I get the following message when running with
|
I think this import alias with collision is the issue as if I rename the contract it works (there's a separate issue for ternaries) https://github.com/endaoment/endaoment-contracts-v2/blob/main/src/test/utils/DSTestPlus.sol#L4-L10 |
slither/slither/solc_parsing/slither_compilation_unit_solc.py Lines 407 to 409 in b96beea
This code here doesn't account for contract name collisions and returns the same contract. This causes a contract to be set as inheriting from itself. This becomes clear if you add an assertion that none of the ancestors contract id's match the contract slither/slither/core/declarations/contract.py Lines 660 to 662 in b96beea
|
closed by #2403 |
Describe the issue:
Older versions of solmate's DSTestPlus have the below block of code (it's slightly modified in newer versions, and I haven't tested those). Even though we don't use the block of code in question, it causes the error shown below.
Logging the value of
ir
andvariable
inssa.py
'sget_variable
method prints the following right before the error:Since we were't using the code, I was able to comment out the problematic section and use slither, though I'm not sure of other workarounds if we were using it
Code example to reproduce the issue:
https://github.com/transmissions11/solmate/blob/44a9963d4c78111f77caa0e65d677b8b46d6f2e6/src/test/utils/DSTestPlus.sol#L15-L29
Version:
0.8.3
Relevant log output:
The text was updated successfully, but these errors were encountered: