diff --git a/pj_media/demos/CMakeLists.txt b/pj_media/demos/CMakeLists.txt index 2464ea4..2f8d225 100644 --- a/pj_media/demos/CMakeLists.txt +++ b/pj_media/demos/CMakeLists.txt @@ -60,14 +60,4 @@ if(TARGET pj_media_qt) target_compile_options(mp4_video_viewer PRIVATE ${PJ_WARNING_FLAGS}) target_link_libraries(mp4_video_viewer PRIVATE pj_media_qt pj_media_core) endif() -elseif(PJ_BUILD_DIALOG_ENGINE_QT) - find_package(Qt6 REQUIRED COMPONENTS Widgets) - set(CMAKE_AUTOMOC ON) - add_executable(mcap_image_viewer mcap_image_viewer.cpp image_widget.hpp) - target_compile_features(mcap_image_viewer PRIVATE cxx_std_20) - target_compile_options(mcap_image_viewer PRIVATE ${PJ_WARNING_FLAGS}) - target_link_libraries(mcap_image_viewer PRIVATE - pj_media_core pj_datastore mcap::mcap libjpeg-turbo::libjpeg-turbo - Qt6::Widgets - ) endif() diff --git a/pj_plugins/src/detail/library_loader.hpp b/pj_plugins/src/detail/library_loader.hpp index cfdb9b6..6f59412 100644 --- a/pj_plugins/src/detail/library_loader.hpp +++ b/pj_plugins/src/detail/library_loader.hpp @@ -33,18 +33,17 @@ inline Expected loadLibraryHandle(std::string_view path) { // RTLD_LOCAL — keep plugin symbols out of the global symbol pool; each // plugin resolves its own copies of bundled statics in // isolation from other plugins and from the host. - // - // Historical note: we USED to also set RTLD_DEEPBIND on glibc to force - // the plugin's own symbol scope ahead of the global one (Conan OpenSSL - // vs system libcrypto, etc.). That flag is a documented trap — it - // breaks LD_PRELOAD'd malloc interposition, which makes every plugin - // dlopen fail under AddressSanitizer (and similarly for jemalloc / - // tcmalloc interposition in production). Plugin-local symbol isolation - // is instead achieved by building plugins with -fvisibility=hidden and - // explicitly marking only the boot-level exports - // (pj_plugin_abi_version + PJ_get__vtable) as default visible. - // See cmake/PjPluginManifest.cmake for the plugin build flags. + // RTLD_DEEPBIND (Linux only, skipped under ASAN) — force the plugin's own + // symbol scope ahead of the global one. Prevents Conan-built + // deps (e.g. paho-mqtt + OpenSSL) from resolving to a + // different version already loaded by the host (e.g. Qt's + // libssl.so.3). Skipped when PJ_ASAN_ACTIVE because ASAN + // uses LD_PRELOAD'd malloc interposition that DEEPBIND + // bypasses, causing dlopen to fail (google/sanitizers#611). int flags = RTLD_NOW | RTLD_LOCAL; +#if defined(__linux__) && defined(RTLD_DEEPBIND) && !defined(PJ_ASAN_ACTIVE) + flags |= RTLD_DEEPBIND; +#endif void* handle = dlopen(std::string(path).c_str(), flags); if (handle == nullptr) { return unexpected(std::string(dlerror()));