summaryrefslogtreecommitdiff
path: root/src/binder/inc/applicationcontext.hpp
diff options
context:
space:
mode:
authorMikhail Kurinnoi/AI Compiler Lab /SRR/Staff Engineer/Samsung Electronics <m.kurinnoi@samsung.com>2020-06-26 01:30:09 +0300
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>2020-06-26 07:30:09 +0900
commit5cd177b448ff1c61c7899647f729e44fef78f142 (patch)
tree7f591434c95a8fbd066dcd58c566345770a14fcf /src/binder/inc/applicationcontext.hpp
parent5c97d445ae987d03d3e9f588272260b7ec683ddd (diff)
downloadcoreclr-5cd177b448ff1c61c7899647f729e44fef78f142.tar.gz
coreclr-5cd177b448ff1c61c7899647f729e44fef78f142.tar.bz2
coreclr-5cd177b448ff1c61c7899647f729e44fef78f142.zip
Fix TPA map hash calculation. (#288)
* Fix TPA map hash calculation. The point of issue is "the Turkish-I Problem". After locale changed, towupper() provide another result for "i" and different hash are calculated in case if file name have "i" letter. * Regression test for #37910
Diffstat (limited to 'src/binder/inc/applicationcontext.hpp')
-rw-r--r--src/binder/inc/applicationcontext.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/binder/inc/applicationcontext.hpp b/src/binder/inc/applicationcontext.hpp
index 83893f33ce..f315b32c0d 100644
--- a/src/binder/inc/applicationcontext.hpp
+++ b/src/binder/inc/applicationcontext.hpp
@@ -71,8 +71,12 @@ namespace BINDER_SPACE
key = e.m_wszSimpleName;
return key;
}
- static count_t Hash(const key_t &str) { return HashiString(str); }
- static BOOL Equals(const key_t &lhs, const key_t &rhs) { LIMITED_METHOD_CONTRACT; return (_wcsicmp(lhs, rhs) == 0); }
+ static count_t Hash(const key_t &str)
+ {
+ SString ssKey(SString::Literal, str);
+ return ssKey.HashCaseInsensitive();
+ }
+ static BOOL Equals(const key_t &lhs, const key_t &rhs) { LIMITED_METHOD_CONTRACT; return (SString::_wcsicmp(lhs, rhs) == 0); }
void OnDestructPerEntryCleanupAction(const SimpleNameToFileNameMapEntry & e)
{