Skip to content
Unverified Commit cf1bde33 authored by Tulio Magno Quites Machado Filho's avatar Tulio Magno Quites Machado Filho Committed by GitHub
Browse files

[clang] Fix sorting module headers (#73146)

Struct Module::Header is not a POD type. As such, qsort() and
llvm::array_pod_sort() must not be used to sort it. This became an issue
with the new implementation of qsort() in glibc 2.39 that is not
guaranteed to be a stable sort, causing Headers to be re-ordered and
corrupted.

Replace the usage of llvm::array_pod_sort() with std::stable_sort() in
order to fix this issue. The signature of compareModuleHeaders() has to
be modified.

Fixes #73145.
parent a4ee55fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment