diff options
author | Jürgen Gehring <Juergen.Gehring@bmw.de> | 2016-12-12 02:35:48 -0800 |
---|---|---|
committer | Jürgen Gehring <Juergen.Gehring@bmw.de> | 2016-12-12 02:35:48 -0800 |
commit | 55559fa14073203f9efc53a6c20d0b92e9bb69e5 (patch) | |
tree | 84980c423d3a66dbd47afd7ccf88e154d52ba161 | |
parent | 53ded2eabd7477e8ff2c2286784b2ba9cad2f802 (diff) | |
download | genivi-common-api-dbus-runtime-55559fa14073203f9efc53a6c20d0b92e9bb69e5.tar.gz |
CommonAPI-D-Bus 3.1.10.43.1.10.4
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | src/CommonAPI/DBus/DBusConnection.cpp | 2 | ||||
-rw-r--r-- | src/CommonAPI/DBus/DBusFactory.cpp | 7 |
3 files changed, 12 insertions, 1 deletions
@@ -1,6 +1,10 @@ Changes ======= +v3.1.10.4 +- Prevent crash (double free) on destruction of static objects +- Fixed 'terminate called without an active exception' on verification test exit + v3.1.10.3 - Fixed crash on dlclose() diff --git a/src/CommonAPI/DBus/DBusConnection.cpp b/src/CommonAPI/DBus/DBusConnection.cpp index 768f214..3ed06a7 100644 --- a/src/CommonAPI/DBus/DBusConnection.cpp +++ b/src/CommonAPI/DBus/DBusConnection.cpp @@ -474,6 +474,8 @@ void DBusConnection::disconnect() { if (enforcerThread_->joinable() && std::this_thread::get_id() != enforcerThread_->get_id()) { enforcerThread_->join(); + } else { + enforcerThread_->detach(); } // remote mainloop watchers diff --git a/src/CommonAPI/DBus/DBusFactory.cpp b/src/CommonAPI/DBus/DBusFactory.cpp index 64c39d4..31a44c4 100644 --- a/src/CommonAPI/DBus/DBusFactory.cpp +++ b/src/CommonAPI/DBus/DBusFactory.cpp @@ -17,12 +17,17 @@ namespace CommonAPI { namespace DBus { +static std::weak_ptr<CommonAPI::Runtime> runtime__; + INITIALIZER(FactoryInit) { + runtime__ = Runtime::get(); Runtime::get()->registerFactory("dbus", Factory::get()); } DEINITIALIZER(FactoryDeinit) { - Runtime::get()->unregisterFactory("dbus"); + if (auto rt = runtime__.lock()) { + rt->unregisterFactory("dbus"); + } } std::shared_ptr<CommonAPI::DBus::Factory> |