Skip to content
Commit 55364e1f authored by Florian Weimer's avatar Florian Weimer
Browse files

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: default avatarStepan Golosunov <stepan@golosunov.pp.ru>
Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
parent e4d8117b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment