Comments (6)
Can you please check this @inian?
from oyente.
Hey, so I think -1 - x is used when x is not a symbolic expression and ~ x is used when x is a symbolic expression where ~ is the z3 bvnot
from oyente.
link here python has built-in ~ operator for a real value. In the link, ~ equals to (-x-1) not (-1-x). Anyway, in some test cases I tried ~x the result is correct but some I tried
(2**256 - 1) - x is correct while ~x is incorrect. What do you think about this @inian ?
from oyente.
Hey just realized that the entire code can just be simplified to
first = stack.pop(0)
computed = ~first
stack.insert(0, computed)
can you give me an example where ~x is incorrect? I will also check
from oyente.
"code" : "0x600019600055" which is converted to opcodes:
[1] PUSH1 0x00
[2] NOT
[4] PUSH1 0x00
[5] SSTORE
And the result should be:
"0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
The number we care about here is 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff which is the result of:
[1] PUSH1 0x00
[2] NOT
This is the test case not0 in vmBitwiseLogicOperationTest.json file
from oyente.
@luongnt95 can u verify if this is fixed?
from oyente.
Related Issues (20)
- Solidity 0.6.x
- Option -r has issues
- Having trouble with newest verions solc:0.8.0 as `solc` is now `solcjs`
- Reentrancy detection machanism
- Upcoming changes in CryticCompile
- Nurses
- How to use the oyente to batch test smart contracts? HOT 2
- docker
- First or second argument must be a Z3 bit-vector expression HOT 1
- ModuleNotFoundError: No module named 'crytic_compile' HOT 2
- Any plan to support solc 0.8.x HOT 1
- Bugs HOT 3
- Bad return value HOT 2
- Error: Expected identifier, got 'LParen' HOT 1
- Exception on binary contract
- UNKNOWN INSTRUCTION: SHL HOT 2
- Why does Oyente report different results on virtually identical contracts?
- docker not run HOT 1
- Installation Error
- python3 error in docker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oyente.