From e5a14d135a79989de1092739dd1d776e53e724ed Mon Sep 17 00:00:00 2001 From: Anthony Eden Date: Fri, 20 Dec 2024 21:06:33 -0800 Subject: [PATCH] Fix UBSan runtime error (load of 'boost::interprocess::mode_t') --- include/boost/interprocess/detail/file_wrapper.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/interprocess/detail/file_wrapper.hpp b/include/boost/interprocess/detail/file_wrapper.hpp index 84b4953..dc2fc7c 100644 --- a/include/boost/interprocess/detail/file_wrapper.hpp +++ b/include/boost/interprocess/detail/file_wrapper.hpp @@ -90,7 +90,8 @@ class file_wrapper //!After the call, "moved" does not represent any file. //!Does not throw file_wrapper(BOOST_RV_REF(file_wrapper) moved) - : m_handle(file_handle_t(ipcdetail::invalid_file())) + : m_handle(file_handle_t(ipcdetail::invalid_file())) + , m_mode(read_only) { this->swap(moved); } //!Moves the ownership of "moved"'s file to *this.