diff --git a/src/binder/assemblybinder.cpp b/src/binder/assemblybinder.cpp index 78ad94772b31..8c8c158a65f4 100644 --- a/src/binder/assemblybinder.cpp +++ b/src/binder/assemblybinder.cpp @@ -645,7 +645,6 @@ namespace BINDER_SPACE _ASSERTE(ppSystemAssembly != NULL); ReleaseHolder pSystemAssembly; - StackSString sCoreLib; // For normal runs, corelib is expected to be found in systemDirectory. // For self-contained single-file bundles, corelib is expected within the bundle @@ -657,7 +656,7 @@ namespace BINDER_SPACE sCoreLibDir.Append(DIRECTORY_SEPARATOR_CHAR_W); } - sCoreLib = sCoreLibDir; + StackSString sCoreLib(sCoreLibDir); sCoreLib.Append(CoreLibName_IL_W); // At run-time, System.Private.CoreLib.dll is expected to be the NI image. diff --git a/src/coreclr/hosts/unixcorebundle/bundle/runner.cpp b/src/coreclr/hosts/unixcorebundle/bundle/runner.cpp index 8467f6692c91..d24adebfb588 100644 --- a/src/coreclr/hosts/unixcorebundle/bundle/runner.cpp +++ b/src/coreclr/hosts/unixcorebundle/bundle/runner.cpp @@ -35,7 +35,7 @@ bool runner_t::probe(const char *relative_path, int64_t *size, int64_t *offset) { for (file_entry_t& entry : m_manifest.files) { - if (strcmp(entry.relative_path().c_str(), relative_path) == 0) + if(entry.relative_path() == relative_path) { *size = entry.size(); *offset = entry.offset(); diff --git a/src/dlls/mscoree/unixinterface.cpp b/src/dlls/mscoree/unixinterface.cpp index c15fb5e316fb..263b8cd56899 100644 --- a/src/dlls/mscoree/unixinterface.cpp +++ b/src/dlls/mscoree/unixinterface.cpp @@ -135,6 +135,10 @@ static void ConvertConfigPropertiesToUnicode( // If this application is a single-file bundle, the bundle-probe callback // is passed in as the value of "BUNDLE_PROBE" property (masquarading as char *). // Therefore obtain the value; don't convert it to Unicode. + // + // This method of communicating "BUNDLE_PROBE" as a string is a temporary hack. + // Please see https://github.com/dotnet/coreclr/issues/26752 about + // designing a better corehost-coreclr interface. *bundleProbe = (BundleProbe *)propertyValues[propertyIndex]; propertyKeysW[propertyIndex] = W("BUNDLE_PROBE"); @@ -175,7 +179,6 @@ extern "C" int coreclr_create_delegate(void*, unsigned int, const char*, const c // Returns: // HRESULT indicating status of the operation. S_OK if the assembly was successfully executed // - extern "C" DLLEXPORT int coreclr_initialize(