[libcxx-commits] [libcxx] Poison memory in variant destroy (PR #101048)

Chris Cotter via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 29 11:36:53 PDT 2024


================
@@ -781,6 +785,9 @@ _LIBCPP_VARIANT_DESTRUCTOR(
     _Trait::_TriviallyAvailable,
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 ~__dtor() = default,
     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __destroy() noexcept {
+#if __has_feature(memory_sanitizer)
----------------
ccotter wrote:

Ah, nevermind, I was using `is_constant_evaluated` incorrectly.

https://github.com/llvm/llvm-project/pull/101048


More information about the libcxx-commits mailing list