-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TPA map hash calculation. #38016
Conversation
I couldn't figure out the best area label to add to this PR. Please help me learn by adding exactly one area label. |
I see some tests failed with
this PR should be fixed first. |
Tagging subscribers to this area: @vitek-karas |
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.
Could you please add a test for this - maybe just the Turkish i. Probably into this suite: https://github.com/dotnet/runtime/tree/master/src/libraries/System.Runtime.Loader/tests |
I believe, I could create test, but I need more time, since I am not really familiar with this test suite. |
@vitek-karas I found, that the only way I could guaranteed test internal TPA map for consistent state is
code block after line: runtime/src/coreclr/src/binder/assemblybinder.cpp Line 1066 in 97e553f
With this changes in CoreCLR we could use simple test with |
Can't we write a repro based on the issue #37910? |
This could be tested by direct
No exception thrown if patch applied, or if |
You are right that the xunit harness under libraries does not make it easy to test. Writing this as a standalone test under coreclr should work better, e.g. you can start with something like this |
I added test. Please note, Linux must have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Would it be better for the test to succeed when this locale is not installed in the system? |
I am not sure about this, since in this case test could never warn you about regression in code. With current implementation, you at least will see, that some tests are failed due to system environment. |
As predicted above, this test is failing on Linux, in all outerloop jobs. Unfortunately, this test was added as a "Pri-1" test, but the outerloop / Pri-1 tests were not triggered as part of this PR. In the future, authors and code reviewers, please pay attention to that. |
Actually, the test only runs on Linux, so maybe it only passes on arm32/arm64 Linux runs, but no other? |
Was tested on amd64 too.
#38016 (comment) |
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.
Fix #37910
CC @alpencolt @jkotas @HJLeee