Skip to content

Commit a2779f6

Browse files
authored
[X86/Funclets] Fix uninitalized values in SoftwareExceptionFrame::UpdateContextFromTransitionBlock (#115065)
This could lead to -1 offset inadvertently not applied in `SfiInit` for control PC. As a consequence a `throw` at the very last instruction of `try` block may not be matched correctly.
1 parent c88106a commit a2779f6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/coreclr/vm/excep.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11306,6 +11306,11 @@ void SoftwareExceptionFrame::UpdateContextFromTransitionBlock(TransitionBlock *p
1130611306
{
1130711307
LIMITED_METHOD_CONTRACT;
1130811308

11309+
m_Context.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
11310+
m_Context.SegCs = 0;
11311+
m_Context.SegSs = 0;
11312+
m_Context.EFlags = 0;
11313+
m_Context.Eax = 0;
1130911314
m_Context.Ecx = pTransitionBlock->m_argumentRegisters.ECX;
1131011315
m_Context.Edx = pTransitionBlock->m_argumentRegisters.EDX;
1131111316
m_ContextPointers.Ecx = &m_Context.Ecx;

0 commit comments

Comments
 (0)