audk/UefiCpuPkg/Library/RegisterCpuFeaturesLib
Zeng, Star 6c5801be6e UefiCpuPkg RegisterCpuFeaturesLib: NumberOfCpus may be uninitialized
NumberOfCpus local variable in GetAcpiCpuData will be uninitialized
when CpuS3DataDxe runs before DxeRegisterCpuFeaturesLib (linked by
CpuFeaturesDxe) because there is no code to initialize it at
(AcpiCpuData != NULL) execution path.

The issue is exposed after cefad282fb
and 38ee7bafa7.
There was negligence in that code review.
One further topic may be "Could EDK2 CI be enhanced to catch this kind
of uninitialized local variable case?". :)

This patch fixes this regression issue.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Message-Id: <20210121093944.1621-1-star.zeng@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2021-01-21 14:30:06 +00:00
..
CpuFeaturesInitialize.c UefiCpuPkg/CpuFeature: reduce time complexty to calc CpuInfo.First 2020-12-14 08:54:22 +00:00
DxeRegisterCpuFeaturesLib.c UefiCpuPkg/RegisterCpuFeaturesLib: Start all processors simultaneously. 2019-07-29 09:25:20 +08:00
DxeRegisterCpuFeaturesLib.inf UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
PeiRegisterCpuFeaturesLib.c UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case. 2020-09-14 13:07:37 +00:00
PeiRegisterCpuFeaturesLib.inf UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case. 2020-09-14 13:07:37 +00:00
RegisterCpuFeatures.h UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case. 2020-09-14 13:07:37 +00:00
RegisterCpuFeaturesLib.c UefiCpuPkg RegisterCpuFeaturesLib: NumberOfCpus may be uninitialized 2021-01-21 14:30:06 +00:00
RegisterCpuFeaturesLib.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00