Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>
- Bret
From: Michael D Kinney
Sent: Friday, July 10, 2020 7:09 PM
To: devel@edk2.groups.io
Cc: Sean Brogan;
Bret Barkelew; Yao, Jiewen
Subject: [EXTERNAL] [Patch v3 08/16] UnitTestFrameworkPkg: Set host application stack size to 256KB
REF:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2803&data=02%7C01%7CBret.Barkelew%40microsoft.com%7C6d34207455e9401311c408d8253f6805%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637300301542442718&sdata=IhFDMIx%2FIz4DQAMJjDmGZo%2FBBZfUFzeYvCbAxbnNTzo%3D&reserved=0
The UEFI Specification defines the minimum stack size before
ExitBootServices() to be 128KB. When running a host based unit
test, there may be additional stack overhead from the host
application environment and cmocka.
Update the build flags to set the size of the stack to 256KB
which is double the UEFI Specification requirement.
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
index c4e6e0e0a6..4dd8d4ac67 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
@@ -30,7 +30,7 @@ [BuildOptions.common.EDKII.HOST_APPLICATION]
#
# MSFT
#
- MSFT:*_*_*_DLINK_FLAGS == /out:"$(BIN_DIR)\$(BASE_NAME).exe" /pdb:"$(BIN_DIR)\$(BASE_NAME).pdb" /IGNORE:4001 /NOLOGO /SUBSYSTEM:CONSOLE /DEBUG /NODEFAULTLIB:libcmt.lib libcmtd.lib
+ MSFT:*_*_*_DLINK_FLAGS == /out:"$(BIN_DIR)\$(BASE_NAME).exe" /pdb:"$(BIN_DIR)\$(BASE_NAME).pdb" /IGNORE:4001 /NOLOGO /SUBSYSTEM:CONSOLE /DEBUG /STACK:0x40000,0x40000 /NODEFAULTLIB:libcmt.lib libcmtd.lib
MSFT:*_*_IA32_DLINK_FLAGS = /MACHINE:I386
MSFT:*_*_X64_DLINK_FLAGS = /MACHINE:AMD64
--
2.21.0.windows.1