diff options
author | Florian Weimer <fweimer@redhat.com> | 2023-11-21 16:45:35 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2023-11-21 16:46:02 +0100 |
commit | 55364e1f7dfab372f0710513c4d1c967c4965f71 (patch) | |
tree | 3cbcd4bb82bc1ab8db4de3c0a07c1466635b9fe7 /elf | |
parent | e4d8117b82065dc72e8df80097360e7c05a349b9 (diff) | |
download | glibc-55364e1f7dfab372f0710513c4d1c967c4965f71.zip glibc-55364e1f7dfab372f0710513c4d1c967c4965f71.tar.gz glibc-55364e1f7dfab372f0710513c4d1c967c4965f71.tar.bz2 |
stdlib: Handle various corner cases in the fallback heapsort for qsort
The previous implementation did not consistently apply the rule that
the child nodes of node K are at 2 * K + 1 and 2 * K + 2, or
that the parent node is at (K - 1) / 2.
Add an internal test that targets the heapsort implementation
directly.
Reported-by: Stepan Golosunov <stepan@golosunov.pp.ru>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf')
0 files changed, 0 insertions, 0 deletions