Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
17dfcf15
Commit
17dfcf15
authored
Oct 15, 2020
by
ben-chain
Committed by
GitHub
Oct 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix JUMPI inputs ordering (#21)
* fix jumpi inputs ordering * fix comment
parent
20329295
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
OVM_SafetyChecker.sol
...s/optimistic-ethereum/OVM/execution/OVM_SafetyChecker.sol
+2
-2
safety-checker.test.json
packages/contracts/test/data/json/safety-checker.test.json
+5
-5
No files found.
packages/contracts/contracts/optimistic-ethereum/OVM/execution/OVM_SafetyChecker.sol
View file @
17dfcf15
...
@@ -116,8 +116,8 @@ contract OVM_SafetyChecker is iOVM_SafetyChecker {
...
@@ -116,8 +116,8 @@ contract OVM_SafetyChecker is iOVM_SafetyChecker {
if ((firstOps >> 192) == 0x3350600060045af1) {
if ((firstOps >> 192) == 0x3350600060045af1) {
_pc += 8;
_pc += 8;
// Call EM and abort execution if instructed
// Call EM and abort execution if instructed
// CALLER PUSH1 0x00 SWAP1 GAS CALL PC PUSH1 0x1d ADD
EQ JUMPI RETURNDATASIZE PUSH1 0x00 DUP1 RETURNDATACOPY PUSH1 0x00 REVERT JUMPDEST PUSH1 0x01 PUSH1 0x00 RETURN JUMPDEST
// CALLER PUSH1 0x00 SWAP1 GAS CALL PC PUSH1 0x1d ADD
JUMPI RETURNDATASIZE PUSH1 0x01 EQ PC PUSH1 0x0c ADD JUMPI RETURNDATASIZE PUSH1 0x00 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x00 REVERT JUMPDEST PUSH1 0x01 PUSH1 0x00 RETURN JUMPDEST
} else if (firstOps == 0x336000905af158601d0157
586012013d600114573d6000803e3d6000fd
5b6001 && secondOps == 0x6000f35b) {
} else if (firstOps == 0x336000905af158601d0157
3d60011458600c01573d6000803e3d6000FD
5b6001 && secondOps == 0x6000f35b) {
_pc += 36;
_pc += 36;
} else {
} else {
return false;
return false;
...
...
packages/contracts/test/data/json/safety-checker.test.json
View file @
17dfcf15
...
@@ -1073,7 +1073,7 @@
...
@@ -1073,7 +1073,7 @@
"out"
:
false
"out"
:
false
},
},
"valid EM call"
:
{
"valid EM call"
:
{
"in"
:
"0x336000905af158601d0157
586012013d600114573d6000803e3d6000fd
5b60016000f35b"
,
"in"
:
"0x336000905af158601d0157
3d60011458600c01573d6000803e3d6000FD
5b60016000f35b"
,
"out"
:
true
"out"
:
true
},
},
"valid identity precompile call"
:
{
"valid identity precompile call"
:
{
...
@@ -1081,15 +1081,15 @@
...
@@ -1081,15 +1081,15 @@
"out"
:
true
"out"
:
true
},
},
"valid EM call, then valid identity precompile call"
:
{
"valid EM call, then valid identity precompile call"
:
{
"in"
:
"0x336000905af158601d0157
586012013d600114573d6000803e3d6000fd
5b60016000f35b3350600060045af1"
,
"in"
:
"0x336000905af158601d0157
3d60011458600c01573d6000803e3d6000FD
5b60016000f35b3350600060045af1"
,
"out"
:
true
"out"
:
true
},
},
"valid EM call, then invalid identity precompile call"
:
{
"valid EM call, then invalid identity precompile call"
:
{
"in"
:
"0x336000905af158601d0157
586012013d600114573d6000803e3d6000fd
5b60016000f35b3350600060035af1"
,
"in"
:
"0x336000905af158601d0157
3d60011458600c01573d6000803e3d6000FD
5b60016000f35b3350600060035af1"
,
"out"
:
false
"out"
:
false
},
},
"valid EM call, then invalid opcode (SLOAD)"
:
{
"valid EM call, then invalid opcode (SLOAD)"
:
{
"in"
:
"0x336000905af158601d0157
586012013d600114573d6000803e3d6000fd
5b60016000f35b54"
,
"in"
:
"0x336000905af158601d0157
3d60011458600c01573d6000803e3d6000FD
5b60016000f35b54"
,
"out"
:
false
"out"
:
false
},
},
"valid identity precompile call, then invalid opcode (SLOAD)"
:
{
"valid identity precompile call, then invalid opcode (SLOAD)"
:
{
...
@@ -1097,7 +1097,7 @@
...
@@ -1097,7 +1097,7 @@
"out"
:
false
"out"
:
false
},
},
"invalid EM call (missing final byte)"
:
{
"invalid EM call (missing final byte)"
:
{
"in"
:
"0x336000905af158601d0157
586012013d600114573d6000803e3d6000fd
5b60016000f3"
,
"in"
:
"0x336000905af158601d0157
3d60011458600c01573d6000803e3d6000FD
5b60016000f3"
,
"out"
:
false
"out"
:
false
},
},
"invalid identity precompile call (missing final byte)"
:
{
"invalid identity precompile call (missing final byte)"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment