Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for llvm/llvm-project#73145 #788

Merged
merged 1 commit into from
Nov 27, 2023
Merged

PR for llvm/llvm-project#73145 #788

merged 1 commit into from
Nov 27, 2023

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Nov 25, 2023

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.

(cherry picked from commit cf1bde33423da5eb9b7dc95daac4aada3167de3c)
@nikic
Copy link
Contributor

nikic commented Nov 26, 2023

@dwblaikie Does this look fine for backport?

@dwblaikie
Copy link
Contributor

@dwblaikie Does this look fine for backport?

Yeah!

@tru tru merged commit f74f3e6 into release/17.x Nov 27, 2023
9 checks passed
@tru tru deleted the llvm-issue73145 branch November 27, 2023 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[clang] 7 tests started to fail with the new glibc qsort()
5 participants