From c9a4223dd9189d882a15b99ca00d1ed2f8f66790 Mon Sep 17 00:00:00 2001 From: Christopher Kohlhoff Date: Tue, 11 Aug 2020 09:51:03 +1000 Subject: [PATCH] Revert "Restore null pointer check for better performance." This reverts commit 388a04cdc1535ba5a33b1da57b1e2e3b9f95ae6d. This change was applied in the wrong spot and introduced an uninitialised memory access. --- asio/include/asio/detail/thread_info_base.hpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/asio/include/asio/detail/thread_info_base.hpp b/asio/include/asio/detail/thread_info_base.hpp index 1799e542..3c21d9b6 100644 --- a/asio/include/asio/detail/thread_info_base.hpp +++ b/asio/include/asio/detail/thread_info_base.hpp @@ -59,13 +59,7 @@ public: // && !defined(ASIO_NO_EXCEPTIONS) { for (int i = 0; i < max_mem_index; ++i) - { - // The following test for non-null pointers is technically redundant, but - // it is significantly faster when using a tight io_context::poll() loop - // in latency sensitive applications. - if (reusable_memory_[i]) - reusable_memory_[i] = 0; - } + reusable_memory_[i] = 0; } ~thread_info_base()