-
-
Save hayeah/73e2c53aab430b3b9f377746ca3e7ce0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: | |
0xc0fefe | |
[0xc0fefe] | |
0x5 | |
[0x5 0xc0fefe] | |
dup1 | |
/* array bound checking code */ | |
// 5 < 6 | |
0x6 | |
[0x6 0x5 0xc0fefe] | |
dup2 | |
[0x5 0x6 0x5 0xc0fefe] | |
lt | |
[0x1 0x5 0xc0fefe] | |
// bound_check_ok = 1 (TRUE) | |
// if(bound_check_ok) { goto tag5 } else { invalid } | |
tag_5 | |
[tag_5 0x1 0x5 0xc0fefe] | |
jumpi | |
// Test condition is true. Will goto tag_5. | |
// And `jumpi` consumes two items from stack. | |
[0x5 0xc0fefe] | |
invalid | |
// Array access is valid. Do it. | |
// stack: [0x5 0xc0fefe] | |
tag_5: | |
sstore | |
[] | |
storage: { 0x5 => 0xc0fefe } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment