Bug 20799 – schwartzSort does not pin transformation results with indirections, leading to memory corruption
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-05-06T09:47:07Z
Last change time
2020-05-09T01:08:43Z
Keywords
pull
Assigned to
Vladimir Panteleev
Creator
Vladimir Panteleev
Comments
Comment #0 by dlang-bugzilla — 2020-05-06T09:47:07Z
import std.algorithm.sorting;
import std.range;
void main()
{
auto arr = 1_000_000.iota.retro.array;
arr.schwartzSort!(
n => new int(n),
(a, b) => *a < *b
);
assert(arr.isSorted());
}
Comment #1 by dlang-bot — 2020-05-06T09:51:28Z
@CyberShadow created dlang/phobos pull request #7470 "Fix Issue 20799 - schwartzSort does not pin transformation results wi…" fixing this issue:
- Fix Issue 20799 - schwartzSort does not pin transformation results with indirections, leading to memory corruption
https://github.com/dlang/phobos/pull/7470
Comment #2 by dlang-bot — 2020-05-06T09:58:01Z
@CyberShadow created dlang/phobos pull request #7471 "Fix Issue 20799 - schwartzSort does not pin transformation results wi…" fixing this issue:
- Fix Issue 20799 - schwartzSort does not pin transformation results with indirections, leading to memory corruption
https://github.com/dlang/phobos/pull/7471
Comment #3 by dlang-bot — 2020-05-09T01:08:43Z
dlang/phobos pull request #7471 "Fix Issue 20799 - schwartzSort does not pin transformation results wi…" was merged into stable:
- 793a78c588647a3e987d8585470519d0f63983dc by Vladimir Panteleev:
Fix Issue 20799 - schwartzSort does not pin transformation results with indirections, leading to memory corruption
https://github.com/dlang/phobos/pull/7471