[U-Boot] [PATCH] x86: Fix out of bounds irq handlers access

Simon Glass sjg at chromium.org
Thu Jan 15 05:25:11 CET 2015


On 12 January 2015 at 18:41, Simon Glass <sjg at chromium.org> wrote:
> On 12 January 2015 at 09:17, Sebastien Ronsse <sronsse at gmail.com> wrote:
>> Using coreboot-x86_defconfig, the following error occurred prior to this modification:
>> CC      arch/x86/lib/interrupts
>> arch/x86/lib/interrupts.c: In function ‘do_irqinfo’:
>> arch/x86/lib/interrupts.c:134:24: error: iteration 16u invokes undefined behavior [-Werror=aggressive-loop-optimizations]
>>    if (irq_handlers[irq].handler != NULL) {
>>                         ^
>> arch/x86/lib/interrupts.c:133:2: note: containing loop
>>   for (irq = 0; irq <= CONFIG_SYS_NUM_IRQS; irq++) {
>>   ^
>> cc1: all warnings being treated as errors
>> scripts/Makefile.build:275: recipe for target 'arch/x86/lib/interrupts.o' failed
>> make[1]: *** [arch/x86/lib/interrupts.o] Error 1
>> Makefile:1093: recipe for target 'arch/x86/lib' failed
>> make: *** [arch/x86/lib] Error 2
>>
>> Signed-off-by: Sebastien Ronsse <sronsse at gmail.com>
>> ---
>>  arch/x86/lib/interrupts.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Thanks!
>
> Acked-by: Simon Glass <sjg at chromium.org>
>
> Also for reference:
>
> https://chromium-review.googlesource.com/#/c/218562/

Applied to u-boot-x86, thanks!


More information about the U-Boot mailing list