[libcxx-commits] [libcxx] [libc++] Add a link to __builtin_verbose_trap from the hardening docs (PR #126930)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 12 07:49:33 PST 2025


https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/126930

None

>From 0ef6b255ee1ea8f06870f57f7fa1af38ef9bb833 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 12 Feb 2025 16:48:10 +0100
Subject: [PATCH] [libc++] Add a link to __builtin_verbose_trap from the
 hardening docs

---
 libcxx/docs/Hardening.rst | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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



More information about the libcxx-commits mailing list