Skip to content

Commit

Permalink
Stop trying to format HOST_RUNTIME_CONTRACT property with locale sett…
Browse files Browse the repository at this point in the history
…ings (#97891)
  • Loading branch information
elinor-fung authored Feb 9, 2024
1 parent ef1b0d6 commit 4b040aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/native/corehost/hostpolicy/deps_resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ bool deps_resolver_t::probe_deps_entry(const deps_entry_t& entry, const pal::str

for (const auto& config : m_probes)
{
trace::verbose(_X(" Using probe config: %s"), config.as_str().c_str());
if (trace::is_enabled())
trace::verbose(_X(" Using probe config: %s"), config.as_str().c_str());

if (config.is_servicing() && !entry.is_serviceable)
{
Expand Down
6 changes: 3 additions & 3 deletions src/native/corehost/hostpolicy/hostpolicy_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,9 @@ int hostpolicy_context_t::initialize(const hostpolicy_init_t &hostpolicy_init, c
}

host_contract.get_runtime_property = &get_runtime_property;
pal::stringstream_t ptr_stream;
ptr_stream << "0x" << std::hex << (size_t)(&host_contract);
if (!coreclr_properties.add(_STRINGIFY(HOST_PROPERTY_RUNTIME_CONTRACT), ptr_stream.str().c_str()))
pal::char_t buffer[STRING_LENGTH("0xffffffffffffffff")];
pal::snwprintf(buffer, ARRAY_SIZE(buffer), _X("0x%zx"), (size_t)(&host_contract));
if (!coreclr_properties.add(_STRINGIFY(HOST_PROPERTY_RUNTIME_CONTRACT), buffer))
{
log_duplicate_property_error(_STRINGIFY(HOST_PROPERTY_RUNTIME_CONTRACT));
return StatusCode::LibHostDuplicateProperty;
Expand Down

0 comments on commit 4b040aa

Please sign in to comment.