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:18 +0100 |
commit | 64e4acf24da15c11cb83f933947df3b2e8a700cd (patch) | |
tree | b3d8e27747379f2b9e4007740f706a63225387f5 /elf/dl-tunables.c | |
parent | 55364e1f7dfab372f0710513c4d1c967c4965f71 (diff) | |
download | glibc-64e4acf24da15c11cb83f933947df3b2e8a700cd.tar glibc-64e4acf24da15c11cb83f933947df3b2e8a700cd.tar.gz glibc-64e4acf24da15c11cb83f933947df3b2e8a700cd.tar.bz2 glibc-64e4acf24da15c11cb83f933947df3b2e8a700cd.zip |
stdlib: The qsort implementation needs to use heapsort in more cases
The existing logic avoided internal stack overflow. To avoid
a denial-of-service condition with adversarial input, it is necessary
to fall over to heapsort if tail-recursing deeply, too, which does
not result in a deep stack of pending partitions.
The new test stdlib/tst-qsort5 is based on Douglas McIlroy's paper
on this subject.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/dl-tunables.c')
0 files changed, 0 insertions, 0 deletions