diff options
Diffstat (limited to 'src/coreclr/hosts')
-rw-r--r-- | src/coreclr/hosts/coreconsole/coreconsole.cpp | 11 | ||||
-rw-r--r-- | src/coreclr/hosts/corerun/corerun.cpp | 9 | ||||
-rw-r--r-- | src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp | 3 |
3 files changed, 7 insertions, 16 deletions
diff --git a/src/coreclr/hosts/coreconsole/coreconsole.cpp b/src/coreclr/hosts/coreconsole/coreconsole.cpp index 1533dff88e..ea4e2e72c5 100644 --- a/src/coreclr/hosts/coreconsole/coreconsole.cpp +++ b/src/coreclr/hosts/coreconsole/coreconsole.cpp @@ -44,7 +44,7 @@ public: m_capacity = m_defaultSize; } if (m_length + strLen + 1 > m_capacity) { - size_t newCapacity = m_capacity * 2; + size_t newCapacity = (m_length + strLen + 1) * 2; wchar_t* newBuffer = new wchar_t[newCapacity]; wcsncpy_s(newBuffer, newCapacity, m_buffer, m_length); delete[] m_buffer; @@ -185,7 +185,7 @@ public: } } - bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) wchar_t** rgTPAExtensions, int countExtensions) + bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions) { if (!m_tpaList.CStr()) return false; @@ -225,7 +225,7 @@ public: } } - void AddFilesFromDirectoryToTPAList(_In_z_ wchar_t* targetPath, _In_reads_(countExtensions) wchar_t** rgTPAExtensions, int countExtensions) + void AddFilesFromDirectoryToTPAList(_In_z_ wchar_t* targetPath, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions) { *m_log << W("Adding assemblies from ") << targetPath << W(" to the TPA list") << Logger::endl; wchar_t assemblyPath[MAX_LONGPATH]; @@ -288,7 +288,7 @@ public: // On first call, scans the coreclr directory for dlls and adds them all to the list. const wchar_t * GetTpaList() { if (!m_tpaList.CStr()) { - wchar_t *rgTPAExtensions[] = { + const wchar_t *rgTPAExtensions[] = { W("*.ni.dll"), // Probe for .ni.dll first so that it's preferred if ni and il coexist in the same dir W("*.dll"), W("*.ni.exe"), @@ -457,7 +457,6 @@ bool TryRun(const int argc, const wchar_t* argv[], Logger &log, const bool verbo W("APP_PATHS"), W("APP_NI_PATHS"), W("NATIVE_DLL_SEARCH_DIRECTORIES"), - W("AppDomainCompatSwitch") }; const wchar_t *property_values[] = { // TRUSTED_PLATFORM_ASSEMBLIES @@ -468,8 +467,6 @@ bool TryRun(const int argc, const wchar_t* argv[], Logger &log, const bool verbo appNiPath, // NATIVE_DLL_SEARCH_DIRECTORIES nativeDllSearchDirs, - // AppDomainCompatSwitch - W("UseLatestBehaviorWhenTFMNotSpecified") }; diff --git a/src/coreclr/hosts/corerun/corerun.cpp b/src/coreclr/hosts/corerun/corerun.cpp index e7ddab21e9..dfbb79c0d2 100644 --- a/src/coreclr/hosts/corerun/corerun.cpp +++ b/src/coreclr/hosts/corerun/corerun.cpp @@ -161,7 +161,7 @@ public: } } - bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) wchar_t** rgTPAExtensions, int countExtensions) + bool TPAListContainsFile(_In_z_ wchar_t* fileNameWithoutExtension, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions) { if (m_tpaList.IsEmpty()) return false; @@ -201,7 +201,7 @@ public: } } - void AddFilesFromDirectoryToTPAList(_In_z_ const wchar_t* targetPath, _In_reads_(countExtensions) wchar_t** rgTPAExtensions, int countExtensions) + void AddFilesFromDirectoryToTPAList(_In_z_ const wchar_t* targetPath, _In_reads_(countExtensions) const wchar_t** rgTPAExtensions, int countExtensions) { *m_log << W("Adding assemblies from ") << targetPath << W(" to the TPA list") << Logger::endl; StackSString assemblyPath; @@ -259,7 +259,7 @@ public: // On first call, scans the coreclr directory for dlls and adds them all to the list. const wchar_t * GetTpaList() { if (m_tpaList.IsEmpty()) { - wchar_t *rgTPAExtensions[] = { + const wchar_t *rgTPAExtensions[] = { W("*.ni.dll"), // Probe for .ni.dll first so that it's preferred if ni and il coexist in the same dir W("*.dll"), W("*.ni.exe"), @@ -495,7 +495,6 @@ bool TryRun(const int argc, const wchar_t* argv[], Logger &log, const bool verbo W("APP_PATHS"), W("APP_NI_PATHS"), W("NATIVE_DLL_SEARCH_DIRECTORIES"), - W("AppDomainCompatSwitch"), W("APP_LOCAL_WINMETADATA") }; const wchar_t *property_values[] = { @@ -507,8 +506,6 @@ bool TryRun(const int argc, const wchar_t* argv[], Logger &log, const bool verbo appNiPath, // NATIVE_DLL_SEARCH_DIRECTORIES nativeDllSearchDirs, - // AppDomainCompatSwitch - W("UseLatestBehaviorWhenTFMNotSpecified"), // APP_LOCAL_WINMETADATA appLocalWinmetadata }; diff --git a/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp b/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp index b3a0c07a79..d7186d7a29 100644 --- a/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp +++ b/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp @@ -379,7 +379,6 @@ int ExecuteManagedAssembly( "APP_PATHS", "APP_NI_PATHS", "NATIVE_DLL_SEARCH_DIRECTORIES", - "AppDomainCompatSwitch", "System.GC.Server", }; const char *propertyValues[] = { @@ -391,8 +390,6 @@ int ExecuteManagedAssembly( appPath.c_str(), // NATIVE_DLL_SEARCH_DIRECTORIES nativeDllSearchDirs.c_str(), - // AppDomainCompatSwitch - "UseLatestBehaviorWhenTFMNotSpecified", // System.GC.Server useServerGc, }; |