From: Woongsuk Date: Tue, 22 Apr 2025 01:54:49 +0000 (+0900) Subject: use setenv in initNICommon() function X-Git-Tag: accepted/tizen/unified/20250604.100251~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8813d170fb4cd58ee84b48ab8d70f5acb2eef9b6;p=platform%2Fcore%2Fdotnet%2Flauncher.git use setenv in initNICommon() function In case of VD integration, The function initNICommon() is called by dlsym(). The string pointed by the putenv() in initNICommon() can be invalid after calling dlclose(). To avoid sigsegv, change putenv to setenv. --- diff --git a/NativeLauncher/tool/ni_common.cc b/NativeLauncher/tool/ni_common.cc index 0568927..519b2b1 100644 --- a/NativeLauncher/tool/ni_common.cc +++ b/NativeLauncher/tool/ni_common.cc @@ -958,7 +958,7 @@ ni_error_e initNICommon() } // disable diagnostics when running crossgen - putenv(const_cast("COMPlus_EnableDiagnostics=0")); + setenv("COMPlus_EnableDiagnostics", "0", 1); if (initializePluginManager("normal")) { _SERR("Fail to initialize PluginManager");