Sort is broken on master?


(Pavol Vaskovic) #1

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


(Kirill Chibisov) #2

Thank you for mentioning this.

I've submitted a fix.


(Pavol Vaskovic) #3

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!


(Ben Cohen) #4

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.


(Ben Cohen) #5

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 :)