Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[IR FE] Fix segfault in save_model() (#37793)

Oleg Pipikineee8f19f6d4b
diff --git a/src/core/xml_util/src/weights_provider.cpp b/src/core/xml_util/src/weights_provider.cpp
index d3b2ddd6c8f..cf78be34a98 100644
--- a/src/core/xml_util/src/weights_provider.cpp
+++ b/src/core/xml_util/src/weights_provider.cpp
@@ -4,6 +4,8 @@
#include "openvino/xml_util/weights_provider.hpp"
+#include <limits>
+
#include "openvino/runtime/aligned_buffer.hpp"
#include "openvino/runtime/shared_buffer.hpp"
#include "openvino/util/common_util.hpp"
@@ -15,9 +17,9 @@ namespace ov::util {
namespace {
+// CVS-193798: unreachable on purpose, mmap must stay disabled here.
size_t get_mmap_region_threshold() {
- const auto page_size = ov::util::get_system_page_size();
- return page_size > 0 ? static_cast<size_t>(page_size) : 1024 * 1024;
+ return std::numeric_limits<size_t>::max();
}
} // namespace