-
Notifications
You must be signed in to change notification settings - Fork 285
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
EOF DATA* opcodes #586
EOF DATA* opcodes #586
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #586 +/- ##
==========================================
+ Coverage 97.33% 97.38% +0.04%
==========================================
Files 80 80
Lines 7739 7949 +210
==========================================
+ Hits 7533 7741 +208
- Misses 206 208 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
lib/evmone/instructions.hpp
Outdated
for (size_t i = 0; i < 32; ++i) | ||
data[i] = state.data[begin + i]; | ||
|
||
index = intx::be::load<uint256>(data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this taking an array (and not iterators)? Otherwise could just use
index = intx::be::load<uint256>(data); | |
index = intx::be::load<uint256>(begin + index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It takes array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need an overload in intx 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made an issue: chfast/intx#288
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use intx::be::unsafe::load(&state.data[begin])
.
336a205
to
8b93f3f
Compare
cf08fe5
to
8891cbc
Compare
72693a7
to
ad36c18
Compare
3fada02
to
5b2a4d8
Compare
I investigated this a bit and I think that codes with new opcodes are most certainly still invalid for some other reason. So this makes those tests ( |
b592f2e
to
54bf309
Compare
@gumb0 what is outstanding here? |
auto& index = stack.top(); | ||
|
||
if (state.data.size() < 32 || (state.data.size() - 32) < index) | ||
return {EVMC_INVALID_MEMORY_ACCESS, gas_left}; // TODO: Introduce EVMC_INVALID_DATA_ACCESS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean general design: maybe padding with zero is better. But I think this is good staring point.
bb6001b
to
043b1b5
Compare
Also increase stack allowance.
No description provided.