Test sort_int_range! for reverse sorting of large unsigned types#42718
Closed
LilithHafner wants to merge 2 commits intoJuliaLang:masterfrom
Closed
Test sort_int_range! for reverse sorting of large unsigned types#42718LilithHafner wants to merge 2 commits intoJuliaLang:masterfrom
LilithHafner wants to merge 2 commits intoJuliaLang:masterfrom
Conversation
Member
Author
|
I also renamed |
Member
|
Sorry that we missed this! Do you think #29842 solves this for you? I think that may be a more complete fix. |
tkf
reviewed
Nov 11, 2021
Member
tkf
left a comment
There was a problem hiding this comment.
Yes, it'd be nice if we can fix it at the level of reverse, as in #29842. But I think the test is a nice addition.
I think it'd be better to do the refactoring where -> counts in a separate PR. It's hard to explain a big diff (when squashed) like this in a concise commit message and hard to know what has been done when people revisit this in the future.
Member
Author
7ba7a24 to
0189e2b
Compare
Member
Author
|
The rename PR is #43052 |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #43034
The bug was in iterating over a reversed unsigned range (which is not possible). It only comes up for 'UInt
,UInt64&UInt128because the signed1::Intpromotes to a signed result if theUIntis smaller in1:rangelen`.This came up in the process of building a comprehensive sorting test suite which may or may not ever end up suitable for merging into SortingAlgorithms or Base. It tests on many input types, which catches things like this, but results in very long compilation times (~30s) and a lot of compiled code (GBs).