Linux block layer
 help / color / mirror / Atom feed
* Block: bio.c:1232:6: error: variable 'i' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
@ 2022-07-11 12:44 Naresh Kamboju
  2022-07-11 14:59 ` Keith Busch
  0 siblings, 1 reply; 2+ messages in thread
From: Naresh Kamboju @ 2022-07-11 12:44 UTC (permalink / raw)
  To: open list, Linux-Next Mailing List, linux-block, lkft-triage,
	regressions
  Cc: Jens Axboe, Al Viro, Christoph Hellwig, clang-built-linux

Following regression found with clang i386 and x86 builds failed on
Linux next-20220711 tag. Please find the build error logs.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>

Regressions found on i386:

   - build-clang-12-defconfig
   - build-clang-nightly-lkftconfig
   - build-clang-13-defconfig
   - build-clang-12-lkftconfig
   - build-clang-14-lkftconfig
   - build-clang-nightly-defconfig
   - build-clang-13-lkftconfig

Regressions found on x86_64:

   - build-clang-nightly-x86_64_defconfig
   - build-clang-nightly-lkftconfig
   - build-clang-13-lkftconfig
   - build-clang-12-lkftconfig
   - build-clang-13-lkftconfig-kcsan
   - build-clang-14-lkftconfig
   - build-clang-14-x86_64_defconfig

make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/build LLVM=1 LLVM_IAS=1
ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- 'HOSTCC=sccache clang'
'CC=sccache clang'
block/bio.c:1232:6: error: variable 'i' is used uninitialized whenever
'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (unlikely(!size)) {
            ^~~~~~~~~~~~~~~
include/linux/compiler.h:78:22: note: expanded from macro 'unlikely'
# define unlikely(x)    __builtin_expect(!!(x), 0)
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
block/bio.c:1254:9: note: uninitialized use occurs here
        while (i < nr_pages)
               ^
block/bio.c:1232:2: note: remove the 'if' if its condition is always false
        if (unlikely(!size)) {
        ^~~~~~~~~~~~~~~~~~~~~~
block/bio.c:1202:17: note: initialize the variable 'i' to silence this warning
        unsigned len, i;
                       ^
                        = 0
1 error generated.

Build details:
---------------
        download_url: https://builds.tuxbuild.com/2BnQO6OXSJejfpLO4fQ3fWa5wVT/,
        git_describe: next-20220711,
        git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next,
        git_sha: 4112a8699ae2eac797415b9be1d7901b3f79e772,
        git_short_log: 4112a8699ae2 (\Add linux-next specific files
for 20220711\),
        kconfig: https://builds.tuxbuild.com/2BnQO6OXSJejfpLO4fQ3fWa5wVT/config
        kernel_version: 5.19.0-rc6,
        make_variables: {
            LLVM: 1,
            LLVM_IAS: 1
        },

Steps to reproduce:
tuxmake --runtime podman --target-arch x86_64 --toolchain clang-14
--kconfig https://builds.tuxbuild.com/2BnQO6OXSJejfpLO4fQ3fWa5wVT/config
LLVM=1 LLVM_IAS=1

Best regards
Naresh Kamboju

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

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

end of thread, other threads:[~2022-07-11 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-11 12:44 Block: bio.c:1232:6: error: variable 'i' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] Naresh Kamboju
2022-07-11 14:59 ` Keith Busch

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