Skip to content
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

[SR-12073] dividingFullWidth is missing overflow checks #54509

Closed
stephentyrone opened this issue Jan 23, 2020 · 2 comments · Fixed by #70823
Closed

[SR-12073] dividingFullWidth is missing overflow checks #54509

stephentyrone opened this issue Jan 23, 2020 · 2 comments · Fixed by #70823
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. numerics Area → standard library: Numeric API standard library Area: Standard library umbrella

Comments

@stephentyrone
Copy link
Member

Previous ID SR-12073
Radar rdar://problem/58839693
Original Reporter @stephentyrone
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug
Assignee @stephentyrone
Priority Medium

md5: c29bc2f189c69046b795880fe2c71338

Issue Description:

Reported in the forums here: https://forums.swift.org/t/signed-integer-big-division-wraps-around-to-negative/32817

We should also take this opportunity to provide a generic implementation on FixedWidthInteger, like I did a few months ago for the full-width multiply.

@stephentyrone
Copy link
Member Author

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@stephentyrone
Copy link
Member Author

Fixed by #70823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. numerics Area → standard library: Numeric API standard library Area: Standard library umbrella
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants