Sort is broken on master?

I hope I'm not being unnecessarily alarmist by posting also here, but the sorting of [Int] is broken in certain situations on recent master. I've filed SR-8682 with reduced test case and narrowed down the introduction of the issue based on swift-DEVELOPMENT snapshots to between 16th and 18th of August.

I'd suspect some of these changes?

cc @Ben_Cohen, @Kirill_Chibisov

Thank you for mentioning this.

I've submitted a fix.

1 Like

As @xwu mentions in the PR review, we need tests with this fix.

When I stumbled upon this, my first reaction was to doubt my sanity: it surely isn’t possible the sort is broken… it’s like if a fundamental law of the universe stopped working and nobody noticed for 17 days!


Definitely not alarmist to post here for concerning regressions – thanks!

It is a bit alarmist to be worried that it was on master for several days. Master isn't a release branch and we shouldn't rely on people spotting issues once things land on master. The checks should be in the test suite, and those checks should be running on every PR so they don't make it to master in the first place (and on bots frequently after, in case the problem is intermittent). Clearly we were undercovered here.

1 Like

Also I moved this post to the standard library, since that's the relevant component, not the compiler (unless it turned out the bug was because of a miscompile :)

1 Like