From 28127cc7624638fafc6260107480adb9b451b5a4 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Tue, 23 Sep 2008 09:11:12 +0000 Subject: [PATCH] Add assert check to make sure new stack size larger than old stack size. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5952 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 5d9226fc7e..49b3d36864 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -477,10 +477,8 @@ PeiDispatcher ( // But if new stack is smaller than the size of old stack, we also reserve // the size of old stack at bottom of permenent memory. // - StackGap = 0; - if (Private->StackSize > OldPeiStackSize) { - StackGap = Private->StackSize - OldPeiStackSize; - } + ASSERT (Private->StackSize >= OldPeiStackSize); + StackGap = Private->StackSize - OldPeiStackSize; // // Update HandOffHob for new installed permenent memory -- 2.39.2