Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux] Fix dangling TheUMEntryPrestub reference #8426

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/vm/dllimportcallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,12 +569,12 @@ class UMEntryThunkCache
AppDomain *m_pDomain;
};

#if defined(_TARGET_X86_) && !defined(FEATURE_PAL)
#ifdef _TARGET_X86_
//-------------------------------------------------------------------------
// One-time creation of special prestub to initialize UMEntryThunks.
//-------------------------------------------------------------------------
Stub *GenerateUMThunkPrestub();
#endif
#endif // _TARGET_X86_

//-------------------------------------------------------------------------
// NExport stub
Expand Down
2 changes: 0 additions & 2 deletions src/vm/i386/cgenx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,6 @@ WORD GetUnpatchedCodeData(LPCBYTE pAddr)

#ifndef DACCESS_COMPILE

#if !defined(FEATURE_PAL)
//-------------------------------------------------------------------------
// One-time creation of special prestub to initialize UMEntryThunks.
//-------------------------------------------------------------------------
Expand Down Expand Up @@ -810,7 +809,6 @@ Stub *GenerateUMThunkPrestub()

RETURN psl->Link(SystemDomain::GetGlobalLoaderAllocator()->GetExecutableHeap());
}
#endif // !FEATURE_PAL

Stub *GenerateInitPInvokeFrameHelper()
{
Expand Down
14 changes: 7 additions & 7 deletions src/vm/prestub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1647,9 +1647,9 @@ PCODE MethodDesc::DoPrestub(MethodTable *pDispatchingMT)
// use the prestub.
//==========================================================================

#if defined(_TARGET_X86_) && !defined(FEATURE_PAL)
#ifdef _TARGET_X86_
static PCODE g_UMThunkPreStub;
#endif
#endif // _TARGET_X86_

#ifndef DACCESS_COMPILE

Expand All @@ -1676,9 +1676,9 @@ void InitPreStubManager(void)
return;
}

#if defined(_TARGET_X86_) && !defined(FEATURE_PAL)
#ifdef _TARGET_X86_
g_UMThunkPreStub = GenerateUMThunkPrestub()->GetEntryPoint();
#endif
#endif // _TARGET_X86_

ThePreStubManager::Init();
}
Expand All @@ -1687,11 +1687,11 @@ PCODE TheUMThunkPreStub()
{
LIMITED_METHOD_CONTRACT;

#if defined(_TARGET_X86_) && !defined(FEATURE_PAL)
#ifdef _TARGET_X86_
return g_UMThunkPreStub;
#else
#else // _TARGET_X86_
return GetEEFuncEntryPoint(TheUMEntryPrestub);
#endif
#endif // _TARGET_X86_
}

PCODE TheVarargNDirectStub(BOOL hasRetBuffArg)
Expand Down