lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+G9fYuFDon59=Nw6WCdgp0FanZ1oE3dCkoq71EK0Bxe6Jhe_g@mail.gmail.com>
Date: Mon, 19 Aug 2024 13:58:49 +0530
From: Naresh Kamboju <naresh.kamboju@...aro.org>
To: linux-mm <linux-mm@...ck.org>, open list <linux-kernel@...r.kernel.org>, 
	lkft-triage@...ts.linaro.org, Linux Regressions <regressions@...ts.linux.dev>
Cc: Kairui Song <kasong@...cent.com>, Barry Song <21cnbao@...il.com>, Chris Li <chrisl@...nel.org>, 
	"Huang, Ying" <ying.huang@...el.com>, Hugh Dickins <hughd@...gle.com>, 
	Kalesh Singh <kaleshsingh@...gle.com>, Ryan Roberts <ryan.roberts@....com>, 
	Andrew Morton <akpm@...ux-foundation.org>, Anders Roxell <anders.roxell@...aro.org>
Subject: gcc-8: mm/swapfile.c:863:40: error: array subscript 1 is above array
 bounds of 'struct list_head[1]' [-Werror=array-bounds]

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@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ