From 5df30a6d270ddec4df02057f1a1fd9523304078f Mon Sep 17 00:00:00 2001 From: Andrew Bakalin Date: Wed, 10 Mar 2021 12:04:11 +0300 Subject: [PATCH] [IE][VPU]: WA for Segmentation fault on dlclose() issue (#4707) * Prevent myriadPlugin to be unloaded at runtime. --- inference-engine/src/vpu/myriad_plugin/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt index c591ff89b13..2672f11d253 100644 --- a/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt +++ b/inference-engine/src/vpu/myriad_plugin/CMakeLists.txt @@ -41,6 +41,11 @@ target_link_libraries(${TARGET_NAME} PRIVATE mvnc inference_engine inference_engine_legacy vpu_graph_transformer) +# MyriadPlugin is not safe to unload it at runtime +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set_target_properties(${TARGET_NAME} PROPERTIES LINK_OPTIONS "-Wl,-z,nodelete") +endif() + ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME}) # LTO