Project

General

Profile

Actions

Bug #12515

closed

vfalls: array subscript is above array bounds

Added by Toomas Soome about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

While building on SPARC:

    ../../sun4v/cpu/niagara_perfctr.c: In function 'niagara_kstat_init':
    ../../sun4v/cpu/niagara_perfctr.c:381:20: error: array subscript is above array bounds [-Werror=array-bounds]
        ksinfop->pic_reg[1] = lpu_perf_regs[i].pic_reg[1];
        ~~~~~~~~~~~~~~~~^~~
    ../../sun4v/cpu/niagara_perfctr.c: In function 'zam_cntr_kstat_update':
    ../../sun4v/cpu/niagara_perfctr.c:742:51: error: array subscript is above array bounds [-Werror=array-bounds]
        pic1_stat = hv_niagara_getperf(ksinfop->pic_reg[1],
                                       ~~~~~~~~~~~~~~~~^~~
    cc1: all warnings being treated as errors

Apparently there are not 1, but 2 regs.

Testing done: build, install, boot (on T4-1).

Actions #1

Updated by Electric Monk almost 2 years ago

  • Gerrit CR set to 503
Actions #2

Updated by Toomas Soome almost 2 years ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk almost 2 years ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

git commit fa42722764b7b54c64cf742fc1d5d4ab0f02511a

commit  fa42722764b7b54c64cf742fc1d5d4ab0f02511a
Author: Toomas Soome <tsoome@me.com>
Date:   2020-07-19T16:28:49.000Z

    12515 vfalls: array subscript is above array bounds
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF