diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-19 15:15:02 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-21 20:03:37 +0800 |
commit | eb99b52f9888e99f449b8b984ee5a095027b5fd9 (patch) | |
tree | 6a8bd931c68fd4489706cf32ef1338b73c2a2f9d | |
parent | c3d0f526c04c277d416996efe347f232716528ad (diff) | |
download | edk2-eb99b52f9888e99f449b8b984ee5a095027b5fd9.tar.gz edk2-eb99b52f9888e99f449b8b984ee5a095027b5fd9.tar.bz2 edk2-eb99b52f9888e99f449b8b984ee5a095027b5fd9.zip |
BaseTools: Fix the crash issue when Dynamic structure Pcd use in FDF
The case is use Dynamic structure Pcd in the FDF file.
Current code already save the Guid, Name and Filed info for those Pcd,
but it directly use the dict key as [Name, Guid] and cause this crash
issue.
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=1264
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index f2146a7790..804f579f5c 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -569,8 +569,8 @@ class WorkspaceAutoGen(AutoGen): 'build',
PARSER_ERROR,
"PCD (%s.%s) used in FDF is not declared in DEC files." % (Guid, Name),
- File = self.FdfProfile.PcdFileLineDict[Name, Guid][0],
- Line = self.FdfProfile.PcdFileLineDict[Name, Guid][1]
+ File = self.FdfProfile.PcdFileLineDict[Name, Guid, Fileds][0],
+ Line = self.FdfProfile.PcdFileLineDict[Name, Guid, Fileds][1]
)
else:
# Check whether Dynamic or DynamicEx PCD used in FDF file. If used, build break and give a error message.
@@ -583,8 +583,8 @@ class WorkspaceAutoGen(AutoGen): 'build',
PARSER_ERROR,
"Using Dynamic or DynamicEx type of PCD [%s.%s] in FDF file is not allowed." % (Guid, Name),
- File = self.FdfProfile.PcdFileLineDict[Name, Guid][0],
- Line = self.FdfProfile.PcdFileLineDict[Name, Guid][1]
+ File = self.FdfProfile.PcdFileLineDict[Name, Guid, Fileds][0],
+ Line = self.FdfProfile.PcdFileLineDict[Name, Guid, Fileds][1]
)
Pa = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
|