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

Commit de4f885

Browse files
author
Rahul Kumar
committed
ARM64: In GetDelegateTarget a portion of the _WIN64 code was under _TARGET_AMD64_ whereas at other places (like NDirectStubLinker::DoNDirect & InlinedCallFrame::HasFunction ) related code is under _WIN64. Make the code in GetDelegateTarget to be in sync with other functions and remove ifdef _TARGET_ADM64_. Without this change for arm64 InlinedCallFrame::m_datum stores unmanaged target pointer but StackWalker assumes it to be a NDirectMethodDesc and tries to dereference it and crashes.
1 parent 36efe1f commit de4f885

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/vm/stubhelpers.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,9 +1245,7 @@ FCIMPL2(void*, StubHelpers::GetDelegateTarget, DelegateObject *pThisUNSAFE, UINT
12451245
UINT_PTR target = (UINT_PTR)orefThis->GetMethodPtrAux();
12461246

12471247
// The lowest bit is used to distinguish between MD and target on 64-bit.
1248-
#ifdef _TARGET_AMD64_
12491248
target = (target << 1) | 1;
1250-
#endif // _TARGET_AMD64_
12511249

12521250
// On 64-bit we pass the real target to the stub-for-host through this out argument,
12531251
// see IL code gen in NDirectStubLinker::DoNDirect for details.

0 commit comments

Comments
 (0)