File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4310,19 +4310,19 @@ namespace
43104310
43114311 // The target MethodDesc may be NULL for field marshalling.
43124312 // Forward P/Invoke stubs (non-CALLI, non-vararg) each target a specific method,
4313- // so the hash blob is just the target MethodDesc pointer. This ensures racing
4314- // threads for the same P/Invoke converge on the same DynamicMethodDesc in the
4315- // ILStubCache, while different P/Invoke methods get distinct cache entries.
4313+ // so the hash blob includes the target MethodDesc pointer and the stub flags.
4314+ // This ensures racing threads for the same P/Invoke converge on the same
4315+ // DynamicMethodDesc in the ILStubCache, while different P/Invoke methods or
4316+ // differently flagged stubs get distinct cache entries.
43164317 if (SF_IsForwardPInvokeStub (dwStubFlags)
43174318 && !SF_IsCALLIStub (dwStubFlags)
43184319 && !SF_IsVarArgStub (dwStubFlags))
43194320 {
43204321 isNonSharedStub = true ;
43214322 }
4322-
43234323 // Late-bound COM stubs depend on metadata on the target MethodDesc (DispIdAttribute, associated properties) in addition to just the signature.
43244324 // Cache based on the target MethodDesc and stub flags instead of the signature to avoid false sharing.
4325- if (SF_IsCOMLateBoundStub (dwStubFlags))
4325+ else if (SF_IsCOMLateBoundStub (dwStubFlags))
43264326 {
43274327 isNonSharedStub = true ;
43284328 }
You can’t perform that action at this time.
0 commit comments