about summary refs log tree commit diff
path: root/stdlib/mpn2dbl.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2023-11-21 16:45:35 +0100
committerFlorian Weimer <fweimer@redhat.com>2023-11-21 16:46:02 +0100
commit55364e1f7dfab372f0710513c4d1c967c4965f71 (patch)
tree3cbcd4bb82bc1ab8db4de3c0a07c1466635b9fe7 /stdlib/mpn2dbl.c
parente4d8117b82065dc72e8df80097360e7c05a349b9 (diff)
downloadglibc-55364e1f7dfab372f0710513c4d1c967c4965f71.tar.gz
glibc-55364e1f7dfab372f0710513c4d1c967c4965f71.tar.xz
glibc-55364e1f7dfab372f0710513c4d1c967c4965f71.zip
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 'stdlib/mpn2dbl.c')
0 files changed, 0 insertions, 0 deletions