Skip to content

[libc++] Add a link to __builtin_verbose_trap from the hardening docs #126930

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

Merged

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Feb 12, 2025

No description provided.

@ldionne ldionne requested a review from a team as a code owner February 12, 2025 15:49
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Feb 12, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 12, 2025

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

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

1 Files Affected:

  • (modified) libcxx/docs/Hardening.rst (+1-3)
diff --git a/libcxx/docs/Hardening.rst b/libcxx/docs/Hardening.rst
index d399b94d27c19..097ad4b73b126 100644
--- a/libcxx/docs/Hardening.rst
+++ b/libcxx/docs/Hardening.rst
@@ -248,14 +248,12 @@ Hardening assertion failure
 ===========================
 
 In production modes (``fast`` and ``extensive``), a hardening assertion failure
-immediately ``_traps <https://llvm.org/docs/LangRef.html#llvm-trap-intrinsic>``
+immediately ``_traps <https://clang.llvm.org/docs/LanguageExtensions.html#builtin-verbose-trap>``
 the program. This is the safest approach that also minimizes the code size
 penalty as the failure handler maps to a single instruction. The downside is
 that the failure provides no additional details other than the stack trace
 (which might also be affected by optimizations).
 
-TODO(hardening): describe ``__builtin_verbose_trap`` once we can use it.
-
 In the ``debug`` mode, an assertion failure terminates the program in an
 unspecified manner and also outputs the associated error message to the error
 output. This is less secure and increases the size of the binary (among other

@var-const var-const added documentation hardening Issues related to the hardening effort labels Feb 12, 2025
@ldionne ldionne merged commit dbfb29f into llvm:main Feb 12, 2025
83 checks passed
@ldionne ldionne deleted the review/hardening-verbose-trap-documentation branch February 12, 2025 22:57
flovent pushed a commit to flovent/llvm-project that referenced this pull request Feb 13, 2025
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Feb 14, 2025
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation hardening Issues related to the hardening effort libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants