-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitly use
u64
operations for safe u8
arithmetic
Fixes #5449 Without this fix, because we use `u8` load and store instructions, the overflow check (which relies on `u64` arithmetic) gets nullified.
- Loading branch information
1 parent
c43b57f
commit 596b842
Showing
3 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
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
2 changes: 1 addition & 1 deletion
2
test/src/e2e_vm_tests/test_programs/should_fail/arith_overflow/u8_add_overflow/test.toml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
category = "disabled" | ||
category = "run" | ||
expected_result = { action = "revert", value = 0 } | ||
validate_abi = false |
2 changes: 1 addition & 1 deletion
2
test/src/e2e_vm_tests/test_programs/should_fail/arith_overflow/u8_mul_overflow/test.toml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
category = "disabled" | ||
category = "run" | ||
expected_result = { action = "revert", value = 0 } | ||
validate_abi = false |