__hostHandle(nullptr),
__domainId(-1),
fd(0),
- __mode(mode),
__initialized(false)
{
_DBG("Constructor called!!");
+
+ // plugin initialize should be called before start loader mainloop.
+ // In case of VD plugins, attaching secure zone is done in the plugin_initialize().
+ // When attaching to a secure zone, if there is a created thread, it will failed.
+ // So, plugin initialize should be called before mainloop start.
+ if (initializePluginManager(mode) < 0) {
+ _ERR("Failed to initialize PluginManager");
+ }
}
CoreRuntime::~CoreRuntime()
putenv(const_cast<char *>("UNW_ARM_UNWIND_METHOD=6"));
#endif // __arm__
- if (initializePluginManager(__mode) < 0) {
- _ERR("Failed to initialize PluginManager");
- return -1;
- }
-
if (initializePathManager(std::string(), std::string(), std::string()) < 0) {
_ERR("Failed to initialize PathManager");
return -1;