-
Notifications
You must be signed in to change notification settings - Fork 17
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
Au::from_px can overflow. #22
Comments
2 tasks
Alternatively, of course, we can keep the checks and add an |
Manishearth
added a commit
that referenced
this issue
May 16, 2017
Manishearth
added a commit
that referenced
this issue
May 16, 2017
Manishearth
added a commit
that referenced
this issue
May 16, 2017
Manishearth
added a commit
that referenced
this issue
May 16, 2017
bors-servo
pushed a commit
that referenced
this issue
May 17, 2017
Clamp Au values between 1<<30 and -(1<<30) and saturate all operations fixes #22, fixes #25 r? @SimonSapin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While trying to run debug assertions in our automation (servo/servo#13387 (review)), I discovered an integer overflow in an image dimension setter, caused by
Au::from_px
.Should we check for overflow in that function and return
None
in that case? Or should we just use unchecked arithmetic in debug builds?cc @pcwalton @mbrubeck
The text was updated successfully, but these errors were encountered: