linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* gcc-8: mm/swapfile.c:863:40: error: array subscript 1 is above array bounds of 'struct list_head[1]' [-Werror=array-bounds]
@ 2024-08-19  8:28 Naresh Kamboju
  2024-08-19 10:15 ` Naresh Kamboju
  0 siblings, 1 reply; 7+ messages in thread
From: Naresh Kamboju @ 2024-08-19  8:28 UTC (permalink / raw)
  To: linux-mm, open list, lkft-triage, Linux Regressions
  Cc: Kairui Song, Barry Song, Chris Li, Huang, Ying, Hugh Dickins,
	Kalesh Singh, Ryan Roberts, Andrew Morton, Anders Roxell

The x86 builds failed with gcc-8 due to following build warnings / errors on
Linux next-20240802 to next-20240819.

x86_64 defconfig gcc-8 build failed
x86_64 defconfig gcc-13 build pass

First seen on the next-20240802 tag.

  GOOD: next-20240730
  BAD:  next-20240802

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build errors:
--------
mm/swapfile.c: In function 'scan_swap_map_slots.constprop':
mm/swapfile.c:863:40: error: array subscript 1 is above array bounds
of 'struct list_head[1]' [-Werror=array-bounds]
   while (!list_empty(&si->frag_clusters[o])) {
                       ~~~~~~~~~~~~~~~~~^~~
mm/swapfile.c:872:43: error: array subscript 1 is above array bounds
of 'struct list_head[1]' [-Werror=array-bounds]
   while (!list_empty(&si->nonfull_clusters[o])) {
                       ~~~~~~~~~~~~~~~~~~~~^~~
In file included from include/linux/list.h:5,
                 from include/linux/wait.h:7,
                 from include/linux/wait_bit.h:8,
                 from include/linux/fs.h:6,
                 from include/linux/highmem.h:5,
                 from include/linux/bvec.h:10,
                 from include/linux/blk_types.h:10,
                 from include/linux/blkdev.h:9,
                 from mm/swapfile.c:9:
include/linux/list.h:612:18: error: array subscript 1 is above array
bounds of 'struct list_head[1]' [-Werror=array-bounds]
  list_entry((ptr)->next, type, member)
                  ^~
include/linux/container_of.h:19:26: note: in definition of macro 'container_of'
  void *__mptr = (void *)(ptr);     \
                          ^~~
include/linux/list.h:612:2: note: in expansion of macro 'list_entry'
  list_entry((ptr)->next, type, member)
  ^~~~~~~~~~
mm/swapfile.c:873:9: note: in expansion of macro 'list_first_entry'
    ci = list_first_entry(&si->nonfull_clusters[o],
         ^~~~~~~~~~~~~~~~
include/linux/list.h:612:18: error: array subscript 1 is above array
bounds of 'struct list_head[1]' [-Werror=array-bounds]
  list_entry((ptr)->next, type, member)
                  ^~
include/linux/container_of.h:19:26: note: in definition of macro 'container_of'
  void *__mptr = (void *)(ptr);     \
                          ^~~
include/linux/list.h:612:2: note: in expansion of macro 'list_entry'
  list_entry((ptr)->next, type, member)
  ^~~~~~~~~~
mm/swapfile.c:864:9: note: in expansion of macro 'list_first_entry'
    ci = list_first_entry(&si->frag_clusters[o],
         ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Steps to reproduce:
-------
# tuxmake --runtime podman --target-arch x86_64 --toolchain gcc-8
--kconfig x86_64_defconfig

Build log link,
------
 - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240819/testrun/24918869/suite/build/test/gcc-8-x86_64_defconfig/log

metadata:
-----
  git describe: next-20240802
  git repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
  git short_log: f524a5e4dfb7 ("Add linux-next specific files for 20240802")
  config: https://storage.tuxsuite.com/public/linaro/lkft/builds/2k6wLr4UFODrd3snUDTPPevXpPY/config
  download_url:
https://storage.tuxsuite.com/public/linaro/lkft/builds/2k6wLr4UFODrd3snUDTPPevXpPY/
  toolchain: gcc-8
  arch: x86_64

--
Linaro LKFT
https://lkft.linaro.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-08-27  8:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-19  8:28 gcc-8: mm/swapfile.c:863:40: error: array subscript 1 is above array bounds of 'struct list_head[1]' [-Werror=array-bounds] Naresh Kamboju
2024-08-19 10:15 ` Naresh Kamboju
2024-08-19 11:44   ` Kairui Song
2024-08-19 19:57     ` Naresh Kamboju
2024-08-20  5:05     ` Andrew Morton
2024-08-20  8:51       ` Chris Li
2024-08-27  8:47         ` Kairui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox