Skip to content

Commit

Permalink
[release/7.0] Fix ALC lookup from the DAC (#78420)
Browse files Browse the repository at this point in the history
* Fix ALC lookup from the DAC

It seems the SOS commands for ALC lookup have
been broken for a bit. Some parts of the impl
weren't DAC-ized and caused failures.

* Update src/coreclr/vm/peassembly.cpp

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
  • Loading branch information
github-actions[bot] and AaronRobinsonMSFT authored Jan 4, 2023
1 parent aa8eb01 commit 5992707
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 6 additions & 5 deletions src/coreclr/binder/inc/assembly.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#endif // !defined(DACCESS_COMPILE)

#include "bundle.h"
#include <assemblybinderutil.h>

class DomainAssembly;

Expand All @@ -50,7 +51,7 @@ namespace BINDER_SPACE
PEImage* GetPEImage();
BOOL GetIsInTPA();

inline AssemblyBinder* GetBinder()
PTR_AssemblyBinder GetBinder()
{
return m_pBinder;
}
Expand All @@ -70,21 +71,21 @@ namespace BINDER_SPACE
LONG m_cRef;
PEImage *m_pPEImage;
AssemblyName *m_pAssemblyName;
AssemblyBinder *m_pBinder;
PTR_AssemblyBinder m_pBinder;
bool m_isInTPA;
DomainAssembly *m_domainAssembly;

#if !defined(DACCESS_COMPILE)
inline void SetBinder(AssemblyBinder *pBinder)
{
_ASSERTE(m_pBinder == NULL || m_pBinder == pBinder);
m_pBinder = pBinder;
}

friend class ::DefaultAssemblyBinder;

#if !defined(DACCESS_COMPILE)
friend class ::CustomAssemblyBinder;
#endif // !defined(DACCESS_COMPILE)

friend class ::DefaultAssemblyBinder;
};

#include "assembly.inl"
Expand Down
6 changes: 2 additions & 4 deletions src/coreclr/vm/peassembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include "strongnameinternal.h"

#include "../binder/inc/applicationcontext.hpp"

#include "assemblybinderutil.h"
#include "../binder/inc/assemblybindercommon.hpp"

#include "sha1.h"
Expand Down Expand Up @@ -1114,10 +1112,10 @@ PTR_AssemblyBinder PEAssembly::GetAssemblyBinder()

PTR_AssemblyBinder pBinder = NULL;

BINDER_SPACE::Assembly* pHostAssembly = GetHostAssembly();
PTR_BINDER_SPACE_Assembly pHostAssembly = GetHostAssembly();
if (pHostAssembly)
{
pBinder = dac_cast<PTR_AssemblyBinder>(pHostAssembly->GetBinder());
pBinder = pHostAssembly->GetBinder();
}
else
{
Expand Down

0 comments on commit 5992707

Please sign in to comment.