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

[release/19.x][libc++] Fix AppleClang version number when checking for __builtin_verbose_trap support #110263

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Sep 27, 2024

We should have been checking against 1700, not 17000, which was a typo.

(cherry picked from commit 1eba879)

@ldionne ldionne added this to the LLVM 19.X Release milestone Sep 27, 2024
@ldionne ldionne requested a review from a team as a code owner September 27, 2024 13:05
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Sep 27, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 27, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

We should have been checking against 1700, not 17000, which was a typo.

(cherry picked from commit 1eba879)


Full diff: https://github.com/llvm/llvm-project/pull/110263.diff

1 Files Affected:

  • (modified) libcxx/vendor/llvm/default_assertion_handler.in (+2-1)
diff --git a/libcxx/vendor/llvm/default_assertion_handler.in b/libcxx/vendor/llvm/default_assertion_handler.in
index 3b6d6b2cca53c2..e12ccccdaff37f 100644
--- a/libcxx/vendor/llvm/default_assertion_handler.in
+++ b/libcxx/vendor/llvm/default_assertion_handler.in
@@ -26,7 +26,8 @@
 #  if __has_builtin(__builtin_verbose_trap)
 // AppleClang shipped a slightly different version of __builtin_verbose_trap from the upstream
 // version before upstream Clang actually got the builtin.
-#    if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 17000
+// TODO: Remove once AppleClang supports the two-arguments version of the builtin.
+#    if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1700
 #      define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap(message)
 #    else
 #      define _LIBCPP_ASSERTION_HANDLER(message) __builtin_verbose_trap("libc++", message)

@ldionne ldionne changed the title [libc++] Fix AppleClang version number when checking for __builtin_verbose_trap support [release/19.x][libc++] Fix AppleClang version number when checking for __builtin_verbose_trap support Sep 27, 2024
@var-const var-const added the hardening Issues related to the hardening effort label Sep 28, 2024
…rbose_trap support (llvm#110161)

We should have been checking against 1700, not 17000, which was a typo.

(cherry picked from commit 1eba879)
@tru tru force-pushed the review/llvm-19-assertion_handler branch from b1affed to 53010fc Compare October 1, 2024 06:56
@tru tru merged commit 53010fc into llvm:release/19.x Oct 1, 2024
8 of 11 checks passed
Copy link

github-actions bot commented Oct 1, 2024

@ldionne (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

@ldionne ldionne deleted the review/llvm-19-assertion_handler branch October 1, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardening Issues related to the hardening effort libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
Development

Successfully merging this pull request may close these issues.

4 participants