Fix AssemblyName cache hash and key#24138
Conversation
|
|
|
Do you plan to add any tests for this? |
The I expected the ContextualReflections test to catch the I am adding tests in corefx. These found the issue, but since they are not yet passing they are disabled until these bits make it. |
|
Need to diagnose the root cause further. This is not fixing the observed issue. |
|
Spent a lot of time in debugger root causing this:
I have added the LoadWithPartialName test. The corefx test will catch the binder cache issue. I used that to debug the failure. I should be able to create a lighter test, but I'll put it in a separate PR. I would like this fix to make preview5. |
|
There are two "regressions" in the test runs. The other regression is. The test is bad. It is regressing because the assembly cache is now finding the |
|
This looks like it will miss preview5. |
Do not use the stackMark if (ptrLoadContextBinder != NULL)
FWIW, I would not mind losing this "feature". Illegal/malformed assembly names will fail everywhere else, except this one place that tries to recover from them. It can be done separately / later. |
Test is failing due to a logic error. Fix is pending in dotnet/corefx#37071
* Add ContextualReflection LoadWithPartialName case * Remove unnecessary MethodImplOptions.NoInlining * Remove m_assembly warning * Fix AssemblyName hash function * AssemblyNative::Load fix stackMark usage Do not use the stackMark if (ptrLoadContextBinder != NULL) * Temporarily disable DefaultContextOverrideTPA Test is failing due to a logic error. Fix is pending in dotnet/corefx#37071 Commit migrated from dotnet/coreclr@a36bc61
Fixes #24135
AssemblyName::Hash(DWORD dwIncludeFlags)was including should be ignored attributes in its hash.AssemblyNative::Loadwas using stackMark in a case where it wasn't needed.RuntimeAssembly.m_assemblywas unsused in C#. It is used in native code. Disable the warning.LoadWithPartialNametest case.NoInliningattribute