Skip to content

Commit 58780b8

Browse files
authored
[libc++][hardening] In production hardening modes, trap rather than abort (#78561)
In the hardening modes that can be used in production (`fast` and `extensive`), make a failed assertion invoke a trap instruction rather than calling verbose abort. In the debug mode, still keep calling verbose abort to provide a better user experience and to allow us to keep our existing testing infrastructure for verifying assertion messages. Since the debug mode by definition enables all assertions, we can be sure that we still check all the assertion messages in the library when running the test suite in the debug mode. The main motivation to use trapping in production is to achieve better code generation and reduce the binary size penalty. This way, the assertion handler can compile to a single instruction, whereas the existing mechanism with verbose abort results in generating a function call that in general cannot be optimized away (made worse by the fact that it's a variadic function, imposing an additional penalty). See the [RFC](https://discourse.llvm.org/t/rfc-hardening-in-libc/73925) for more details. Note that this mechanism can now be completely [overridden at CMake configuration time](#77883). This patch also significantly refactors `check_assertion.h` and expands its test coverage. The main changes: - when overriding `verbose_abort`, don't do matching inside the function -- just print the error message to `stderr`. This removes the need to set a global matcher and allows to do matching in the parent process after the child finishes; - remove unused logic for matching source locations and for using wildcards; - make matchers simple functors; - introduce `DeathTestResult` that keeps data about the test run, primarily to make it easier to test. In addition to the refactoring, `check_assertion.h` can now recognize when a process exits due to a trap.
1 parent 0388ab3 commit 58780b8

File tree

119 files changed

+483
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+483
-354
lines changed

libcxx/docs/BuildingLibcxx.rst

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -485,28 +485,25 @@ LLVM-specific options
485485
.. _assertion-handler:
486486

487487
Overriding the default assertion handler
488-
==========================================
489-
490-
When the library wants to terminate due to an unforeseen condition (such as
491-
a hardening assertion failure), the program is aborted through a special verbose
492-
termination function. The library provides a default function that prints an
493-
error message and calls ``std::abort()``. Note that this function is provided by
494-
the static or shared library, so it is only available when deploying to
495-
a platform where the compiled library is sufficiently recent. On older
496-
platforms, the program will terminate in an unspecified unsuccessful manner, but
497-
the quality of diagnostics won't be great.
498-
499-
However, vendors can also override that mechanism at CMake configuration time.
500-
When a hardening assertion fails, the library invokes the
501-
``_LIBCPP_ASSERTION_HANDLER`` macro. A vendor may provide a header that contains
502-
a custom definition of this macro and specify the path to the header via the
503-
``LIBCXX_ASSERTION_HANDLER_FILE`` CMake variable. If provided, this header will
504-
be included by the library and replace the default implementation. The header
505-
must not include any standard library headers (directly or transitively) because
506-
doing so will almost always create a circular dependency. The
507-
``_LIBCPP_ASSERTION_HANDLER(message)`` macro takes a single parameter that
508-
contains an error message explaining the hardening failure and some details
509-
about the source location that triggered it.
488+
========================================
489+
490+
When the library wants to terminate due to a hardening assertion failure, the
491+
program is aborted by invoking a trap instruction (or in debug mode, by
492+
a special verbose termination function that prints an error message and calls
493+
``std::abort()``). This is done to minimize the code size impact of enabling
494+
hardening in the library. However, vendors can also override that mechanism at
495+
CMake configuration time.
496+
497+
Under the hood, a hardening assertion will invoke the
498+
``_LIBCPP_ASSERTION_HANDLER`` macro upon failure. A vendor may provide a header
499+
that contains a custom definition of this macro and specify the path to the
500+
header via the ``LIBCXX_ASSERTION_HANDLER_FILE`` CMake variable. If provided,
501+
this header will be included by the library and replace the default
502+
implementation. The header must not include any standard library headers
503+
(directly or transitively) because doing so will almost always create a circular
504+
dependency. The ``_LIBCPP_ASSERTION_HANDLER(message)`` macro takes a single
505+
parameter that contains an error message explaining the hardening failure and
506+
some details about the source location that triggered it.
510507

511508
When a hardening assertion fails, it means that the program is about to invoke
512509
library undefined behavior. For this reason, the custom assertion handler is

libcxx/docs/ReleaseNotes/18.rst

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,18 @@ Deprecations and Removals
107107
macro is provided to restore the previous behavior, and it will be supported in the LLVM 18 release only.
108108
In LLVM 19 and beyond, ``_LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT`` will not be honored anymore.
109109

110-
- The only supported way to customize the assertion handler that gets invoked when a hardening assertion fails
111-
is now by setting the ``LIBCXX_ASSERTION_HANDLER_FILE`` CMake variable and providing a custom header. See
112-
the documentation on overriding the default assertion handler for details.
110+
- Overriding `__libcpp_verbose_abort` no longer has any effect on library assertions. The only supported way
111+
to customize the assertion handler that gets invoked when a hardening assertion fails is now by setting the
112+
``LIBCXX_ASSERTION_HANDLER_FILE`` CMake variable and providing a custom header. See the documentation on
113+
overriding the default assertion handler for details. The ability to override `__libcpp_verbose_abort` will
114+
be removed in an upcoming release in favor of the new overriding mechanism.
115+
116+
- In safe mode (which is now equivalent to the ``extensive`` hardening mode), a failed assertion will now
117+
generate a trap rather than a call to verbose abort.
113118

114119
- The ``_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED`` macro is not honored anymore in LLVM 18.
115-
Please see the updated documentation about the hardening modes in libc++ and in particular the
116-
``_LIBCPP_VERBOSE_ABORT`` macro for details.
120+
Please see the updated documentation about the hardening modes in libc++ and in particular on
121+
overriding the default assertion handler.
117122

118123
- The headers ``<experimental/deque>``, ``<experimental/forward_list>``, ``<experimental/list>``,
119124
``<experimental/map>``, ``<experimental/memory_resource>``, ``<experimental/regex>``, ``<experimental/set>``,
@@ -136,13 +141,15 @@ Deprecations and Removals
136141
Upcoming Deprecations and Removals
137142
----------------------------------
138143

144+
- The ability to override ``__libcpp_verbose_abort`` will be removed in an upcoming release.
145+
139146
LLVM 19
140147
~~~~~~~
141148

142149
- The ``LIBCXX_ENABLE_ASSERTIONS`` CMake variable that was used to enable the safe mode will be deprecated and setting
143150
it will trigger an error; use the ``LIBCXX_HARDENING_MODE`` variable with the value ``extensive`` instead. Similarly,
144-
the ``_LIBCPP_ENABLE_ASSERTIONS`` macro will be deprecated (setting it to ``1`` still enables the extensive mode the
145-
LLVM 19 release while also issuing a deprecation warning). See :ref:`the hardening documentation
151+
the ``_LIBCPP_ENABLE_ASSERTIONS`` macro will be deprecated (setting it to ``1`` still enables the extensive mode in
152+
the LLVM 19 release while also issuing a deprecation warning). See :ref:`the hardening documentation
146153
<using-hardening-modes>` for more details.
147154

148155
- The base template for ``std::char_traits`` has been marked as deprecated and will be removed in LLVM 19. If you

libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// REQUIRES: has-unix-headers
1212
// UNSUPPORTED: c++03, c++11, c++14, c++17
1313
// UNSUPPORTED: libcpp-hardening-mode=none
14-
// XFAIL: availability-verbose_abort-missing
14+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1515

1616
#include <algorithm>
1717
#include <array>

libcxx/test/libcxx/algorithms/alg.sorting/assert.sort.invalid_comparator.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// REQUIRES: has-unix-headers
1212
// UNSUPPORTED: c++03, c++11, c++14, c++17
1313
// UNSUPPORTED: !libcpp-hardening-mode=debug
14-
// XFAIL: availability-verbose_abort-missing
14+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1515
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG_STRICT_WEAK_ORDERING_CHECK
1616
// When the debug mode is enabled, this test fails because we actually catch on the fly that the comparator is not
1717
// a strict-weak ordering before we catch that we'd dereference out-of-bounds inside std::sort, which leads to different

libcxx/test/libcxx/assertions/customize_verbose_abort.compile-time.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ void my_abort(char const*, ...) {
2222
}
2323

2424
int main(int, char**) {
25-
_LIBCPP_ASSERT(false, "message");
25+
_LIBCPP_VERBOSE_ABORT("%s", "message");
2626
return EXIT_FAILURE;
2727
}

libcxx/test/libcxx/assertions/customize_verbose_abort.link-time.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ void std::__libcpp_verbose_abort(char const*, ...) {
1919
}
2020

2121
int main(int, char**) {
22-
_LIBCPP_ASSERT(false, "message");
22+
std::__libcpp_verbose_abort("%s", "message");
2323
return EXIT_FAILURE;
2424
}

libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//===----------------------------------------------------------------------===//
88

99
// Test that the default verbose termination function aborts the program.
10+
// XFAIL: availability-verbose_abort-missing
1011

12+
#include <__verbose_abort>
1113
#include <csignal>
1214
#include <cstdlib>
1315

@@ -19,6 +21,6 @@ void signal_handler(int signal) {
1921

2022
int main(int, char**) {
2123
if (std::signal(SIGABRT, signal_handler) != SIG_ERR)
22-
_LIBCPP_ASSERT(false, "foo");
24+
std::__libcpp_verbose_abort("%s", "foo");
2325
return EXIT_FAILURE;
2426
}

libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_extensive_mode.pass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212

1313
// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
1414
// UNSUPPORTED: c++03, !has-unix-headers, no-localization
15-
// The ability to set a custom abort message is required to compare the assertion message.
16-
// XFAIL: availability-verbose_abort-missing
15+
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
16+
// debug mode).
17+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1718
// Note that GCC doesn't support `-Wno-macro-redefined`.
1819
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_ENABLE_ASSERTIONS=1
1920

libcxx/test/libcxx/assertions/modes/extensive.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// UNSUPPORTED: c++03
1515
// `check_assertion.h` requires Unix headers.
1616
// REQUIRES: has-unix-headers
17-
// XFAIL: availability-verbose_abort-missing
1817

1918
#include <cassert>
2019
#include "check_assertion.h"

libcxx/test/libcxx/assertions/modes/fast.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// UNSUPPORTED: c++03
1515
// `check_assertion.h` requires Unix headers.
1616
// REQUIRES: has-unix-headers
17-
// XFAIL: availability-verbose_abort-missing
1817

1918
#include <cassert>
2019
#include "check_assertion.h"

libcxx/test/libcxx/assertions/modes/override_with_extensive_mode.pass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
1212
// UNSUPPORTED: c++03, !has-unix-headers, no-localization
13-
// The ability to set a custom abort message is required to compare the assertion message.
14-
// XFAIL: availability-verbose_abort-missing
13+
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
14+
// debug mode).
15+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1516
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
1617

1718
#include <cassert>

libcxx/test/libcxx/assertions/modes/override_with_fast_mode.pass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
// `check_assertion.h` is only available starting from C++11 and requires Unix headers and regex support.
1212
// UNSUPPORTED: c++03, !has-unix-headers, no-localization
13-
// The ability to set a custom abort message is required to compare the assertion message.
14-
// XFAIL: availability-verbose_abort-missing
13+
// The ability to set a custom abort message is required to compare the assertion message (which only happens in the
14+
// debug mode).
15+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1516
// ADDITIONAL_COMPILE_FLAGS: -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST
1617

1718
#include <cassert>

libcxx/test/libcxx/containers/sequences/array/array.zero/assert.back.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// REQUIRES: has-unix-headers
1010
// UNSUPPORTED: c++03
1111
// UNSUPPORTED: libcpp-hardening-mode=none
12-
// XFAIL: availability-verbose_abort-missing
12+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1313

1414
// test that array<T, 0>::back() triggers an assertion
1515

libcxx/test/libcxx/containers/sequences/array/array.zero/assert.front.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// REQUIRES: has-unix-headers
1010
// UNSUPPORTED: c++03
1111
// UNSUPPORTED: libcpp-hardening-mode=none
12-
// XFAIL: availability-verbose_abort-missing
12+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1313

1414
// test that array<T, 0>::back() triggers an assertion
1515

libcxx/test/libcxx/containers/sequences/array/array.zero/assert.subscript.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// REQUIRES: has-unix-headers
1010
// UNSUPPORTED: c++03
1111
// UNSUPPORTED: libcpp-hardening-mode=none
12-
// XFAIL: availability-verbose_abort-missing
12+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1313

1414
// test that array<T, 0>::operator[] triggers an assertion
1515

libcxx/test/libcxx/containers/sequences/deque/assert.pop_back.empty.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// UNSUPPORTED: libcpp-hardening-mode=none
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <deque>
1919

libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.erase_iter.end.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// UNSUPPORTED: libcpp-hardening-mode=none
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <list>
1919

libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.pop_back.empty.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// UNSUPPORTED: libcpp-hardening-mode=none
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <list>
1919
#include <cassert>

libcxx/test/libcxx/containers/sequences/vector/assert.back.empty.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// UNSUPPORTED: libcpp-hardening-mode=none
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <vector>
1919
#include <cassert>

libcxx/test/libcxx/containers/sequences/vector/assert.cback.empty.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// UNSUPPORTED: libcpp-hardening-mode=none
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <vector>
1919

libcxx/test/libcxx/containers/sequences/vector/assert.cfront.empty.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// UNSUPPORTED: libcpp-hardening-mode=none
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <vector>
1919

libcxx/test/libcxx/containers/sequences/vector/assert.cindex.oob.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// UNSUPPORTED: libcpp-hardening-mode=none
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <vector>
1919
#include <cassert>

libcxx/test/libcxx/containers/sequences/vector/assert.front.empty.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// UNSUPPORTED: libcpp-hardening-mode=none
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <vector>
1919
#include <cassert>

libcxx/test/libcxx/containers/sequences/vector/assert.index.oob.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// UNSUPPORTED: libcpp-hardening-mode=none
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <vector>
1919
#include <cassert>

libcxx/test/libcxx/containers/sequences/vector/assert.pop_back.empty.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// UNSUPPORTED: libcpp-hardening-mode=none
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <vector>
1919

libcxx/test/libcxx/containers/unord/unord.map/assert.bucket.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// REQUIRES: has-unix-headers
1414
// UNSUPPORTED: c++03
1515
// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
16-
// XFAIL: availability-verbose_abort-missing
16+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
1717

1818
#include <unordered_map>
1919
#include <string>

libcxx/test/libcxx/containers/unord/unord.map/assert.bucket_size.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// REQUIRES: has-unix-headers
1818
// UNSUPPORTED: c++03
1919
// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
20-
// XFAIL: availability-verbose_abort-missing
20+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
2121

2222
#include <unordered_map>
2323
#include <string>

libcxx/test/libcxx/containers/unord/unord.map/assert.max_load_factor.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// REQUIRES: has-unix-headers
1919
// UNSUPPORTED: c++03
2020
// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
21-
// XFAIL: availability-verbose_abort-missing
21+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
2222

2323
#include <unordered_map>
2424
#include <string>

libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// REQUIRES: has-unix-headers
1818
// UNSUPPORTED: c++03
1919
// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
20-
// XFAIL: availability-verbose_abort-missing
20+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
2121

2222
#include <unordered_map>
2323
#include <string>

libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket_size.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// REQUIRES: has-unix-headers
1818
// UNSUPPORTED: c++03
1919
// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
20-
// XFAIL: availability-verbose_abort-missing
20+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
2121

2222
#include <unordered_map>
2323
#include <string>

libcxx/test/libcxx/containers/unord/unord.multimap/assert.max_load_factor.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// REQUIRES: has-unix-headers
1919
// UNSUPPORTED: c++03
2020
// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
21-
// XFAIL: availability-verbose_abort-missing
21+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
2222

2323
#include <unordered_map>
2424
#include <string>

libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// REQUIRES: has-unix-headers
1818
// UNSUPPORTED: c++03
1919
// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
20-
// XFAIL: availability-verbose_abort-missing
20+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
2121

2222
#include <unordered_set>
2323

libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket_size.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// REQUIRES: has-unix-headers
1818
// UNSUPPORTED: c++03
1919
// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
20-
// XFAIL: availability-verbose_abort-missing
20+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
2121

2222
#include <unordered_set>
2323

libcxx/test/libcxx/containers/unord/unord.multiset/assert.max_load_factor.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// REQUIRES: has-unix-headers
1919
// UNSUPPORTED: c++03
2020
// REQUIRES: libcpp-hardening-mode={{extensive|debug}}
21-
// XFAIL: availability-verbose_abort-missing
21+
// XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
2222

2323
#include <unordered_set>
2424

0 commit comments

Comments
 (0)