Skip to content

Commit 0204b8d

Browse files
ARM64: Avoid dereferencing incorrect process' buffer
1 parent 64513ac commit 0204b8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Backend/Encoder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,11 @@ Encoder::Encode()
399399
#ifdef _M_X64_OR_ARM64
400400
#ifdef _M_X64
401401
PrologEncoder &unwindInfo = m_func->m_prologEncoder;
402+
unwindInfo.FinalizeUnwindInfo((BYTE*)m_func->GetJITOutput()->GetCodeAddress(), (DWORD)codeSize);
402403
#else
403404
UnwindInfoManager &unwindInfo = m_func->m_unwindInfo;
405+
unwindInfo.FinalizeUnwindInfo((BYTE*)localAddress, (DWORD)codeSize);
404406
#endif
405-
unwindInfo.FinalizeUnwindInfo((BYTE*)m_func->GetJITOutput()->GetCodeAddress(), (DWORD)codeSize);
406407

407408
char * localXdataAddr = nullptr;
408409
#if ENABLE_OOP_NATIVE_CODEGEN

0 commit comments

Comments
 (0)