[Issue 15132] std.algorithm.sort crash on windows

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Oct 2 10:59:03 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=15132

--- Comment #4 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to mzfhhhh from comment #3)
> yes,i call the builtin array sort...
> my actual opCmp code is quite complicated,i check the code a long time
> and find there are different results on different platforms.

Any chance you can try the std.algorithm.sort? It may have more useful error
(or more consistent behavior at least).

Also, can you narrow down the code to a minimal example that causes the
undesired behavior?

It's possible there is an issue with the builtin sort. But sort really does
require that items it has already sorted are sorted. I'm not sure what steps it
assumes are correct.

An access violation doesn't seem like it should happen, but it's possibly due
to an optimization that is invalid with an invalid opCmp.

--


More information about the Digitalmars-d-bugs mailing list