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-8682] Sort doesn't work correctly in recent master #51196

Open
palimondo mannequin opened this issue Sep 2, 2018 · 6 comments
Open

[SR-8682] Sort doesn't work correctly in recent master #51196

palimondo mannequin opened this issue Sep 2, 2018 · 6 comments

Comments

@palimondo
Copy link
Mannequin

palimondo mannequin commented Sep 2, 2018

Previous ID SR-8682
Radar rdar://problem/44099288
Original Reporter @palimondo
Type Bug

Attachment: Download

Environment

Swift `master` September 1st.

Additional Detail from JIRA
Votes 0
Component/s Compiler, Standard Library
Labels Bug, 5.0Regression
Assignee None
Priority Medium

md5: 95127a31654eb1c96497beda220fecf6

Issue Description:

The attached reduced test case shows that sorting [Int] doesn't work in recent master.

How wasn't this caught by validation tests?! It looks like the array has to have a certain size for this to manifest itself?

Issue wan't reproducible on Xcode Beta 6 from 13th of August. Binary search for the onset of the problem with swift-DEVELOPMENT snapshots points to introduction of the issue between 16th of 18th of August.

@palimondo
Copy link
Mannequin Author

palimondo mannequin commented Sep 2, 2018

I'd suspect some of these PRs.

@palimondo
Copy link
Mannequin Author

palimondo mannequin commented Sep 2, 2018

cc overlazy (JIRA User), @airspeedswift

@hamishknight
Copy link
Collaborator

hamishknight commented Sep 2, 2018

Another example:

let a = [3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4]
print(a.sorted())
// [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 4]
//                               ~~~

@belkadan
Copy link
Contributor

belkadan commented Sep 4, 2018

@swift-ci create

@moiseev
Copy link
Mannequin

moiseev mannequin commented Sep 11, 2018

Fixed in #19107

@xwu
Copy link
Collaborator

xwu commented Mar 21, 2021

@palimondo Should this bug be closed?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants