Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84042?usp=email )
Change subject: soc/intel/pmclib.c: Make sure array_size is not 0 ......................................................................
soc/intel/pmclib.c: Make sure array_size is not 0
On xeon-sp this is zero. With GCC LTO this triggers the stringop-overread warning.
Change-Id: Ieee6e9bddc4e738eb560dd0e69dc3087ac9f5da6 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/common/block/pmc/pmclib.c 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/84042/1
diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c index 7650fe4..6e5539f 100644 --- a/src/soc/intel/common/block/pmc/pmclib.c +++ b/src/soc/intel/common/block/pmc/pmclib.c @@ -351,6 +351,8 @@ printk(BIOS_DEBUG, "GPE0 STD STS: ");
sts_arr = soc_std_gpe_sts_array(&array_size); + if (array_size == 0) + return 0; print_num_status_bits(array_size, gpe_sts, sts_arr); printk(BIOS_DEBUG, "\n");