From 7b03fe3acd442b6adaec8458408cb198fe49c89f Mon Sep 17 00:00:00 2001 From: Mike Purvis Date: Mon, 8 Feb 2021 15:53:34 -0500 Subject: [PATCH 1/4] Fix shebang for class_loader_headers_update.py (#180) Signed-off-by: Mike Purvis --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7580a954..1e6f59a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,7 @@ install(TARGETS ${PROJECT_NAME} install(DIRECTORY include/class_loader/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) -install(PROGRAMS scripts/class_loader_headers_update.py +catkin_install_python(PROGRAMS scripts/class_loader_headers_update.py DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) if(CATKIN_ENABLE_TESTING) From ca8e8fc9d6efc9ac060493bd4ae519e66d864d2a Mon Sep 17 00:00:00 2001 From: "David V. Lu!!" Date: Fri, 28 May 2021 13:29:18 -0400 Subject: [PATCH 2/4] Fix spelling mistake (#183) Signed-off-by: David V. Lu --- include/class_loader/class_loader_core.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class_loader/class_loader_core.hpp b/include/class_loader/class_loader_core.hpp index 791be38f..67418640 100644 --- a/include/class_loader/class_loader_core.hpp +++ b/include/class_loader/class_loader_core.hpp @@ -217,7 +217,7 @@ void registerPlugin(const std::string & class_name, const std::string & base_cla if (factoryMap.find(class_name) != factoryMap.end()) { CONSOLE_BRIDGE_logWarn( "class_loader.impl: SEVERE WARNING!!! " - "A namespace collision has occured with plugin factory for class %s. " + "A namespace collision has occurred with plugin factory for class %s. " "New factory will OVERWRITE existing one. " "This situation occurs when libraries containing plugins are directly linked against an " "executable (the one running right now generating this message). " From 905223afc12ec897812d433a3e8a54693e4550f8 Mon Sep 17 00:00:00 2001 From: Geoffrey Biggs Date: Wed, 8 Dec 2021 03:29:49 +0900 Subject: [PATCH 3/4] Update package maintainers (ROS 1) (#189) * Update package maintainers Signed-off-by: Geoffrey Biggs * Add previous maintainer as an author Signed-off-by: Geoffrey Biggs --- package.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.xml b/package.xml index 66554f3e..6cc29e0e 100644 --- a/package.xml +++ b/package.xml @@ -6,7 +6,8 @@ The class_loader package is a ROS-independent package for loading plugins during runtime and the foundation of the higher level ROS "pluginlib" library. class_loader utilizes the host operating system's runtime loader to open runtime libraries (e.g. .so/.dll files), introspect the library for exported plugin classes, and allows users to instantiate objects of said exported classes without the explicit declaration (i.e. header file) for those classes. - Steven! Ragnarök + Michael Carroll + Geoffrey Biggs BSD http://ros.org/wiki/class_loader @@ -14,6 +15,7 @@ https://github.com/ros/class_loader Mirza Shah + Steven! Ragnarök catkin From 1b432c9355e44bb437c0e52464521bc1646471c0 Mon Sep 17 00:00:00 2001 From: "xinyu.wang" Date: Wed, 4 Sep 2024 22:05:08 +0200 Subject: [PATCH 4/4] suppress sanitizer warning about (expected) leak Signed-off-by: xinyu.wang --- include/class_loader/class_loader_core.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/class_loader/class_loader_core.hpp b/include/class_loader/class_loader_core.hpp index 67418640..c5913ae0 100644 --- a/include/class_loader/class_loader_core.hpp +++ b/include/class_loader/class_loader_core.hpp @@ -163,6 +163,15 @@ bool hasANonPurePluginLibraryBeenOpened(); CLASS_LOADER_PUBLIC void hasANonPurePluginLibraryBeenOpened(bool hasIt); +#if defined(__has_feature) +#if __has_feature(address_sanitizer) // for clang +#define __SANITIZE_ADDRESS__ // GCC already sets this +#endif +#endif + +#if defined(__SANITIZE_ADDRESS__) +#include +#endif // Plugin Functions /** @@ -207,6 +216,11 @@ void registerPlugin(const std::string & class_name, const std::string & base_cla // Create factory impl::AbstractMetaObject * new_factory = new impl::MetaObject(class_name, base_class_name); + +#if defined(__SANITIZE_ADDRESS__) + __lsan_ignore_object(new_factory); +#endif + new_factory->addOwningClassLoader(getCurrentlyActiveClassLoader()); new_factory->setAssociatedLibraryPath(getCurrentlyLoadingLibraryName());