From c5aa40675a3d4c58b0cfd7c0ecad481daa3a063b Mon Sep 17 00:00:00 2001 From: srpgilles Date: Tue, 30 Dec 2025 15:20:19 +0000 Subject: [PATCH] Fix `check_that_free_is_allowed` so that it properly checks `is_free_allowed` and not `is_malloc_allowed` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libeigen/eigen!2101 Co-authored-by: Sébastien Gilles --- Eigen/src/Core/util/Memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index 1492f72c9..9ae780819 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -114,7 +114,7 @@ EIGEN_DEVICE_FUNC inline bool is_free_allowed_impl(bool update, bool new_value = EIGEN_DEVICE_FUNC inline bool is_free_allowed() { return is_free_allowed_impl(false); } EIGEN_DEVICE_FUNC inline bool set_is_free_allowed(bool new_value) { return is_free_allowed_impl(true, new_value); } EIGEN_DEVICE_FUNC inline void check_that_free_is_allowed() { - eigen_assert(is_malloc_allowed() && + eigen_assert(is_free_allowed() && "heap deallocation is forbidden (EIGEN_RUNTIME_NO_MALLOC is defined and set_is_free_allowed is false)"); } #else