From 661c24e7e9e6510b62de0817719d89310554f683 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Aug 2026 19:35:12 +0000 Subject: [PATCH 1/3] Remove fAcquireLock parameter from SetupBindingPaths Co-authored-by: elinor-fung <47805090+elinor-fung@users.noreply.github.com> --- src/coreclr/binder/applicationcontext.cpp | 5 ++--- src/coreclr/binder/defaultassemblybinder.cpp | 3 +-- src/coreclr/binder/inc/applicationcontext.hpp | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/coreclr/binder/applicationcontext.cpp b/src/coreclr/binder/applicationcontext.cpp index bb399c5ffb01c0..fea2ffd2adcb1b 100644 --- a/src/coreclr/binder/applicationcontext.cpp +++ b/src/coreclr/binder/applicationcontext.cpp @@ -80,12 +80,11 @@ namespace BINDER_SPACE HRESULT ApplicationContext::SetupBindingPaths(SString &sTrustedPlatformAssemblies, SString &sPlatformResourceRoots, - SString &sAppPaths, - BOOL fAcquireLock) + SString &sAppPaths) { HRESULT hr = S_OK; - CRITSEC_Holder contextLock(fAcquireLock ? GetCriticalSectionCookie() : NULL); + CRITSEC_Holder contextLock(GetCriticalSectionCookie()); if (m_pTrustedPlatformAssemblyMap != nullptr) { GO_WITH_HRESULT(S_OK); diff --git a/src/coreclr/binder/defaultassemblybinder.cpp b/src/coreclr/binder/defaultassemblybinder.cpp index cf986dc9b6ab3a..ae9833f9de0d25 100644 --- a/src/coreclr/binder/defaultassemblybinder.cpp +++ b/src/coreclr/binder/defaultassemblybinder.cpp @@ -203,7 +203,7 @@ HRESULT DefaultAssemblyBinder::SetupBindingPaths(SString &sTrustedPlatformAssem EX_TRY { - hr = GetAppContext()->SetupBindingPaths(sTrustedPlatformAssemblies, sPlatformResourceRoots, sAppPaths, TRUE /* fAcquireLock */); + hr = GetAppContext()->SetupBindingPaths(sTrustedPlatformAssemblies, sPlatformResourceRoots, sAppPaths); } EX_CATCH_HRESULT(hr); return hr; @@ -231,4 +231,3 @@ HRESULT DefaultAssemblyBinder::BindToSystem(BINDER_SPACE::Assembly** ppSystemAss return hr; } - diff --git a/src/coreclr/binder/inc/applicationcontext.hpp b/src/coreclr/binder/inc/applicationcontext.hpp index 8aad61e49f4b49..6642e68fd5f047 100644 --- a/src/coreclr/binder/inc/applicationcontext.hpp +++ b/src/coreclr/binder/inc/applicationcontext.hpp @@ -86,8 +86,7 @@ namespace BINDER_SPACE HRESULT SetupBindingPaths(/* in */ SString &sTrustedPlatformAssemblies, /* in */ SString &sPlatformResourceRoots, - /* in */ SString &sAppPaths, - /* in */ BOOL fAcquireLock); + /* in */ SString &sAppPaths); // Getters/Setter inline ExecutionContext *GetExecutionContext(); From 57c56a24eaf2982df3e7bddada4c9579b630ad57 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Thu, 13 Aug 2026 16:01:49 -0700 Subject: [PATCH 2/3] Apply suggestion from @elinor-fung --- src/coreclr/binder/applicationcontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/binder/applicationcontext.cpp b/src/coreclr/binder/applicationcontext.cpp index fea2ffd2adcb1b..10262b7f78b83e 100644 --- a/src/coreclr/binder/applicationcontext.cpp +++ b/src/coreclr/binder/applicationcontext.cpp @@ -88,7 +88,7 @@ namespace BINDER_SPACE if (m_pTrustedPlatformAssemblyMap != nullptr) { GO_WITH_HRESULT(S_OK); - } + _ASSERTE(m_pTrustedPlatformAssemblyMap == nullptr); // // Parse TrustedPlatformAssemblies From 6e0b80cf1c99d09d8ceeb8605196be730d00df25 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Thu, 13 Aug 2026 16:02:51 -0700 Subject: [PATCH 3/3] Apply suggestion from @elinor-fung --- src/coreclr/binder/applicationcontext.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/coreclr/binder/applicationcontext.cpp b/src/coreclr/binder/applicationcontext.cpp index 10262b7f78b83e..280ecef7873243 100644 --- a/src/coreclr/binder/applicationcontext.cpp +++ b/src/coreclr/binder/applicationcontext.cpp @@ -84,10 +84,6 @@ namespace BINDER_SPACE { HRESULT hr = S_OK; - CRITSEC_Holder contextLock(GetCriticalSectionCookie()); - if (m_pTrustedPlatformAssemblyMap != nullptr) - { - GO_WITH_HRESULT(S_OK); _ASSERTE(m_pTrustedPlatformAssemblyMap == nullptr); //