-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[clang] 7 tests started to fail with the new glibc qsort()
#73145
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
Closed
tuliom opened this issue
Nov 22, 2023
· 4 comments
· Fixed by #73146 or llvm/llvm-project-release-prs#788
Closed
[clang] 7 tests started to fail with the new glibc qsort()
#73145
tuliom opened this issue
Nov 22, 2023
· 4 comments
· Fixed by #73146 or llvm/llvm-project-release-prs#788
Labels
Milestone
Comments
@llvm/issue-subscribers-clang-modules Author: Tulio Magno Quites Machado Filho (tuliom)
The following tests started to fail with the new `qsort()` in glibc 2.39:
They're crashing with the following message:
|
This was referenced Nov 22, 2023
qsort()
qsort()
qsort()
qsort()
tuliom
added a commit
that referenced
this issue
Nov 24, 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-pick cf1bde3 |
/branch llvm/llvm-project-release-prs/issue73145 |
/pull-request llvm/llvm-project-release-prs#788 |
tru
pushed a commit
that referenced
this issue
Nov 27, 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 cf1bde3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The following tests started to fail with the new
qsort()
in glibc 2.39:They're crashing with the following message:
The text was updated successfully, but these errors were encountered: