You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When variables are declared nearby (sometimes either in other abstract contract, but close on declaration order), using the setVariable method on one, can erase the information about the other variable.
Given that myAddress (that occupies ~uint160) and myBool are stored together, the second setVariable method aims to the entire data slot and overwrites it with 0x0000...1 (true), and when the myAddress slot is fetched, is filled with 0s.
An example contract is added, and a test replicating the descripted bug.
The text was updated successfully, but these errors were encountered:
Bug description:
PR #117
When variables are declared nearby (sometimes either in other abstract contract, but close on declaration order), using the
setVariable
method on one, can erase the information about the other variable.Given that
myAddress
(that occupies ~uint160
) andmyBool
are stored together, the secondsetVariable
method aims to the entire data slot and overwrites it with0x0000...1
(true
), and when themyAddress
slot is fetched, is filled with0
s.An example contract is added, and a test replicating the descripted bug.
The text was updated successfully, but these errors were encountered: