Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • kernel
  • debug
  • debug_core.c
Find file BlameHistoryPermalink
  • Daniel Thompson's avatar
    kdb: Avoid array subscript warnings on non-SMP builds · d07ce4e3
    Daniel Thompson authored Oct 21, 2019
    
    
    Recent versions of gcc (reported on gcc-7.4) issue array subscript
    warnings for builds where SMP is not enabled.
    
    kernel/debug/debug_core.c: In function 'kdb_dump_stack_on_cpu':
    kernel/debug/debug_core.c:452:17: warning: array subscript is outside array
    +bounds [-Warray-bounds]
         if (!(kgdb_info[cpu].exception_state & DCPU_IS_SLAVE)) {
               ~~~~~~~~~^~~~~
       kernel/debug/debug_core.c:469:33: warning: array subscript is outside array
    +bounds [-Warray-bounds]
         kgdb_info[cpu].exception_state |= DCPU_WANT_BT;
       kernel/debug/debug_core.c:470:18: warning: array subscript is outside array
    +bounds [-Warray-bounds]
         while (kgdb_info[cpu].exception_state & DCPU_WANT_BT)
    
    There is no bug here but there is scope to improve the code
    generation for non-SMP systems (whilst also silencing the warning).
    
    Reported-by: default avatarkbuild test robot <lkp@intel.com>
    Fixes: 2277b492
    
     ("kdb: Fix stack crawling on 'running' CPUs that aren't the master")
    Signed-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
    Link: https://lore.kernel.org/r/20191021101057.23861-1-daniel.thompson@linaro.org
    
    
    Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
    d07ce4e3
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7