",
// Choice[1]: Rfc822Name (EmailAddress)
"email:sanemail1@example.org",
// Choice[2]: DnsName
diff --git a/src/mono/mono/sgen/sgen-array-list.h b/src/mono/mono/sgen/sgen-array-list.h
index d98e678cfc48c5..4de9433dbf891d 100644
--- a/src/mono/mono/sgen/sgen-array-list.h
+++ b/src/mono/mono/sgen/sgen-array-list.h
@@ -60,7 +60,10 @@ static inline guint32
sgen_clz (guint32 x)
{
gulong leading_zero_bits;
- return _BitScanReverse (&leading_zero_bits, (gulong)x) ? 31 - leading_zero_bits : 32;
+ if (_BitScanReverse (&leading_zero_bits, (gulong)x))
+ return 31 - leading_zero_bits;
+ else
+ return 32;
}
#elif defined(ENABLE_MSVC_LZCNT) && defined(_MSC_VER)
static inline guint32
diff --git a/src/mono/wasm/debugger/tests/debugger-test-with-colon-in-source-name/debugger-test-with-colon-in-source-name.csproj b/src/mono/wasm/debugger/tests/debugger-test-with-colon-in-source-name/debugger-test-with-colon-in-source-name.csproj
index bc2a6da92befd0..e6c35ecaf56ec7 100644
--- a/src/mono/wasm/debugger/tests/debugger-test-with-colon-in-source-name/debugger-test-with-colon-in-source-name.csproj
+++ b/src/mono/wasm/debugger/tests/debugger-test-with-colon-in-source-name/debugger-test-with-colon-in-source-name.csproj
@@ -1 +1 @@
-
+
diff --git a/src/native/corehost/apphost/standalone/hostfxr_resolver.cpp b/src/native/corehost/apphost/standalone/hostfxr_resolver.cpp
index 2c244807ac9a94..d06be0719551f5 100644
--- a/src/native/corehost/apphost/standalone/hostfxr_resolver.cpp
+++ b/src/native/corehost/apphost/standalone/hostfxr_resolver.cpp
@@ -38,6 +38,11 @@ hostfxr_resolver_t::hostfxr_resolver_t(const pal::string_t& app_root)
{
m_status_code = StatusCode::CoreHostLibMissingFailure;
}
+ else if (!pal::is_path_rooted(m_fxr_path))
+ {
+ // We should always be loading hostfxr from an absolute path
+ m_status_code = StatusCode::CoreHostLibMissingFailure;
+ }
else if (pal::load_library(&m_fxr_path, &m_hostfxr_dll))
{
m_status_code = StatusCode::Success;
diff --git a/src/native/corehost/build.cmd b/src/native/corehost/build.cmd
index e5f535467ad38b..ff40b5048a66be 100644
--- a/src/native/corehost/build.cmd
+++ b/src/native/corehost/build.cmd
@@ -5,7 +5,7 @@ setlocal
:: Initialize the args that will be passed to cmake
set "__sourceDir=%~dp0"
:: remove trailing slash
-if %__sourceDir:~-1%==\ set "__ProjectDir=%__sourceDir:~0,-1%"
+if "%__sourceDir:~-1%"=="\" set "__sourceDir=%__sourceDir:~0,-1%"
set "__RepoRootDir=%__sourceDir%\..\..\.."
:: normalize
diff --git a/src/native/corehost/fxr/standalone/hostpolicy_resolver.cpp b/src/native/corehost/fxr/standalone/hostpolicy_resolver.cpp
index 67ddd18de3a488..bb0da3238f42b6 100644
--- a/src/native/corehost/fxr/standalone/hostpolicy_resolver.cpp
+++ b/src/native/corehost/fxr/standalone/hostpolicy_resolver.cpp
@@ -180,6 +180,10 @@ int hostpolicy_resolver::load(
return StatusCode::CoreHostLibMissingFailure;
}
+ // We should always be loading hostpolicy from an absolute path
+ if (!pal::is_path_rooted(host_path))
+ return StatusCode::CoreHostLibMissingFailure;
+
// Load library
// We expect to leak hostpolicy - just as we do not unload coreclr, we do not unload hostpolicy
if (!pal::load_library(&host_path, &g_hostpolicy))
diff --git a/src/native/corehost/fxr_resolver.h b/src/native/corehost/fxr_resolver.h
index 3df6c2de3053d3..ecbf37c12b1ffc 100644
--- a/src/native/corehost/fxr_resolver.h
+++ b/src/native/corehost/fxr_resolver.h
@@ -44,6 +44,10 @@ int load_fxr_and_get_delegate(hostfxr_delegate_type type, THostPathToConfigCallb
return StatusCode::CoreHostLibMissingFailure;
}
+ // We should always be loading hostfxr from an absolute path
+ if (!pal::is_path_rooted(fxr_path))
+ return StatusCode::CoreHostLibMissingFailure;
+
// Load library
if (!pal::load_library(&fxr_path, &fxr))
{
diff --git a/src/native/corehost/hostpolicy/deps_resolver.cpp b/src/native/corehost/hostpolicy/deps_resolver.cpp
index 66d44f0c17dae0..a00f4dabc71545 100644
--- a/src/native/corehost/hostpolicy/deps_resolver.cpp
+++ b/src/native/corehost/hostpolicy/deps_resolver.cpp
@@ -830,13 +830,21 @@ bool deps_resolver_t::resolve_probe_dirs(
}
}
- // If the deps file is missing add known locations.
- if (!get_app_deps().exists())
+ // If the deps file is missing for the app, add known locations.
+ // For libhost scenarios, there is no app or app path
+ if (m_host_mode != host_mode_t::libhost && !get_app_deps().exists())
{
+ assert(!m_app_dir.empty());
+
// App local path
add_unique_path(asset_type, m_app_dir, &items, output, &non_serviced, core_servicing);
- (void) library_exists_in_dir(m_app_dir, LIBCORECLR_NAME, &m_coreclr_path);
+ if (m_coreclr_path.empty())
+ {
+ // deps_resolver treats being able to get the coreclr path as optional, so we ignore the return value here.
+ // The caller is responsible for checking whether coreclr path is set and handling as appropriate.
+ (void) library_exists_in_dir(m_app_dir, LIBCORECLR_NAME, &m_coreclr_path);
+ }
}
// Handle any additional deps.json that were specified.
diff --git a/src/native/corehost/hostpolicy/standalone/coreclr_resolver.cpp b/src/native/corehost/hostpolicy/standalone/coreclr_resolver.cpp
index b040c3e8546278..8df8e395e3f259 100644
--- a/src/native/corehost/hostpolicy/standalone/coreclr_resolver.cpp
+++ b/src/native/corehost/hostpolicy/standalone/coreclr_resolver.cpp
@@ -13,6 +13,10 @@ bool coreclr_resolver_t::resolve_coreclr(const pal::string_t& libcoreclr_path, c
pal::string_t coreclr_dll_path(libcoreclr_path);
append_path(&coreclr_dll_path, LIBCORECLR_NAME);
+ // We should always be loading coreclr from an absolute path
+ if (!pal::is_path_rooted(coreclr_dll_path))
+ return false;
+
if (!pal::load_library(&coreclr_dll_path, &coreclr_resolver_contract.coreclr))
{
return false;
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy