-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Correctly check for overflow in add, mul and pow #6452
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
Merged
IGI-111
merged 65 commits into
master
from
swaystar123/proper_overflow_unsafe_math_checking
Sep 9, 2024
Merged
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
eba72bc
add flag check in sway-core
SwayStar123 b7ca9d5
add log and log2 tests for u16, u32, u64, u8
SwayStar123 3f6bbbd
use compiler intrinsics in panic_on_overflow_enabled
SwayStar123 1f1ef85
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 9bcbbdf
comment out failing tests
SwayStar123 9ae376f
add commented 0th root test
SwayStar123 120155d
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 bb66005
comment tests and add logs
SwayStar123 0e81036
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 be43433
fmt
SwayStar123 19c0152
Merge branch 'swaystar123/proper_overflow_unsafe_math_checking' of ht…
SwayStar123 1659638
change u8 add and mul back to how it was
SwayStar123 4b585b1
f,mt
SwayStar123 1bcadae
add overflow tests
SwayStar123 434f1a3
add overflow tests
SwayStar123 5f2dce2
uncomment tests
SwayStar123 8d9ee95
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 4dcbe17
properly overflow
SwayStar123 01874e1
fmt
SwayStar123 a32edeb
remove unsafe math tests
SwayStar123 f7e8e7b
fmt
SwayStar123 3c48ffb
add back u256 log tests
SwayStar123 3ad9f3f
add back pow overflow tests
SwayStar123 4d4fcfc
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 1c78e35
move flag check to seperate if
SwayStar123 9ca5832
Merge branch 'swaystar123/proper_overflow_unsafe_math_checking' of ht…
SwayStar123 25d4f4c
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 60dabf4
add pow capping and tests
SwayStar123 5eb34eb
attempt u256 pow fix
SwayStar123 d271f37
assign directly
SwayStar123 499df33
use wqml instead of mul
SwayStar123 d3de539
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 e807b7b
add i to 48 in assembly
SwayStar123 c168312
Merge branch 'swaystar123/proper_overflow_unsafe_math_checking' of ht…
SwayStar123 1e89675
simplify asm
SwayStar123 ae9b0b2
Update sway-lib-std/src/math.sw
SwayStar123 b2b17cc
Update sway-lib-std/src/math.sw
SwayStar123 bbc8728
Update sway-lib-std/src/math.sw
SwayStar123 7a1e44d
Update sway-lib-core/src/ops.sw
SwayStar123 5672dd7
Update sway-lib-std/src/math.sw
SwayStar123 a8871e2
Update test/src/in_language_tests/test_programs/math_inline_tests/src…
SwayStar123 e10fa19
update documentation
SwayStar123 fe73915
Update sway-lib-std/src/math.sw
SwayStar123 5746b6c
add more math tests
SwayStar123 6784761
Merge branch 'swaystar123/proper_overflow_unsafe_math_checking' of ht…
SwayStar123 80e55f0
Update sway-lib-core/src/ops.sw
SwayStar123 0f8e90d
Update sway-lib-core/src/ops.sw
SwayStar123 876b98b
import option variants
SwayStar123 8f897ba
Merge branch 'swaystar123/proper_overflow_unsafe_math_checking' of ht…
SwayStar123 65f554a
import self aswell
SwayStar123 901343d
self not Self
SwayStar123 a5bae63
Merge branch 'master' of https://github.com/FuelLabs/sway into swayst…
SwayStar123 d576c47
fmt
SwayStar123 636ff3b
remove _u256
SwayStar123 110a913
fix tests
SwayStar123 1f1ee30
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
sdankel 0ad0cb8
rename panic_on_overflow_enabled function
SwayStar123 f645aca
Merge branch 'swaystar123/proper_overflow_unsafe_math_checking' of ht…
SwayStar123 642038d
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 f2d9b9d
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 71501ba
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 fc4bc3c
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
bitzoic 45845a1
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 79e5962
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
K1-R1 8f8816e
Merge branch 'master' into swaystar123/proper_overflow_unsafe_math_ch…
SwayStar123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.