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#71312 #771

Merged
merged 1 commit into from
Nov 14, 2023
Merged

PR for llvm/llvm-project#71312 #771

merged 1 commit into from
Nov 14, 2023

Conversation

llvmbot
Copy link
Collaborator

@llvmbot llvmbot commented Nov 9, 2023

`MergePotentialElts::operator<` asserts that the two elements being
compared are not equal. However, sorting functions are allowed to invoke
the comparison function with equal arguments (though they usually don't
for efficiency reasons).

There is an existing special-case that disables the assert if
_GLIBCXX_DEBUG is used, which may invoke the comparator with equal args
to verify strict weak ordering. I believe libc++ also has strict weak
ordering checks under some options nowadays.

Recently, #71312 was reported, where a change to glibc's qsort_r
implementation can also result in comparison between equal elements.
From what I understood, this is an inefficiency that will be fixed on
the glibc side as well, but I think at this point we should just remove
this assertion.

Fixes llvm/llvm-project#71312.

(cherry picked from commit 74a76a288562c486f377121855ef7db0386e0e43)
@tru
Copy link
Contributor

tru commented Nov 13, 2023

@arsenm ok to backport?

@tru tru merged commit 98bfdac into release/17.x Nov 14, 2023
14 of 15 checks passed
@tru tru deleted the llvm-issue71312 branch November 14, 2023 08:22
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.

SIGILL with new libc qsort_r implementation in BranchFolder::MergePotentialsElt
3 participants