You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that unsigned integer subtraction was mapped to Sub::sub(a, b) in Rust (a - b), instead of a.wrapping_sub(b). In C, unsigned integer subtraction wraps, but in rust, unless wrapping_sub is used, it panics on overflow in debug builds, and has UB in release builds.
The text was updated successfully, but these errors were encountered:
It appears that unsigned integer subtraction was mapped to
Sub::sub(a, b)
in Rust (a - b
), instead ofa.wrapping_sub(b)
. In C, unsigned integer subtraction wraps, but in rust, unlesswrapping_sub
is used, it panics on overflow in debug builds, and has UB in release builds.The text was updated successfully, but these errors were encountered: