@@ -15306,6 +15306,13 @@ HRESULT Debugger::FuncEvalSetup(DebuggerIPCE_FuncEvalInfo *pEvalInfo,
15306
15306
return CORDBG_E_ILLEGAL_AT_GC_UNSAFE_POINT;
15307
15307
}
15308
15308
15309
+ if (filterContext != NULL && ::GetSP(filterContext) != ALIGN_DOWN(::GetSP(filterContext), STACK_ALIGN_SIZE))
15310
+ {
15311
+ // SP is not aligned, we cannot do a FuncEval here
15312
+ LOG((LF_CORDB, LL_INFO1000, "D::FES SP is unaligned"));
15313
+ return CORDBG_E_FUNC_EVAL_BAD_START_POINT;
15314
+ }
15315
+
15309
15316
// Create a DebuggerEval to hold info about this eval while its in progress. Constructor copies the thread's
15310
15317
// CONTEXT.
15311
15318
DebuggerEval *pDE = new (interopsafe, nothrow) DebuggerEval(filterContext, pEvalInfo, fInException);
@@ -15439,6 +15446,13 @@ HRESULT Debugger::FuncEvalSetupReAbort(Thread *pThread, Thread::ThreadAbortReque
15439
15446
return CORDBG_E_ILLEGAL_AT_GC_UNSAFE_POINT;
15440
15447
}
15441
15448
15449
+ if (::GetSP(filterContext) != ALIGN_DOWN(::GetSP(filterContext), STACK_ALIGN_SIZE))
15450
+ {
15451
+ // SP is not aligned, we cannot do a FuncEval here
15452
+ LOG((LF_CORDB, LL_INFO1000, "D::FESRA: SP is unaligned"));
15453
+ return CORDBG_E_FUNC_EVAL_BAD_START_POINT;
15454
+ }
15455
+
15442
15456
// Create a DebuggerEval to hold info about this eval while its in progress. Constructor copies the thread's
15443
15457
// CONTEXT.
15444
15458
DebuggerEval *pDE = new (interopsafe, nothrow) DebuggerEval(filterContext, pThread, requester);
0 commit comments