-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Segmentation fault when using sortperm with lt=!isless #32675
Comments
Notice that I think I know why this is happening. Maybe it is because the |
Note that you can use the sortperm(k; rev=true) One could add to the documentation that the function supplied via the Of course, if this leads to a segfault, it should probably be fixed regardless. |
I can confirm that this occasionally segfaults on 1.0.4, 1.1.1, and master:
|
I think that one possible way to fix that is to call the function |
* Change partitioning scheme to use scratch space * Randomize pivot selection with a hash-based fallback for when `rand` is unavailable * remove an unnecessary sorting operation in typealias construction in base/show.jl * Seed rng before generating precompile statements * Add presorted check to avoid performance regressions * test invalid `lt` to close #11429 & #32675 * test that PartialQuickSort is stable * update radix sort dispatch heuristics because quicksort is now faster and the primary competition Co-authored-by: Petr Vana <petvana@centrum.cz> Co-authored-by: Oscar Smith <oscardssmith@gmail.com>
Hi guys!
I tried to get the indexes to sort an array in descending order using:
However, when I use the following array:
I get sometimes a segmentation fault because it is trying to access the position -5:
The text was updated successfully, but these errors were encountered: