NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/54549: sys/modules/exec_elf32 from 10 hours ago fails to build with clang



>Number:         54549
>Category:       misc
>Synopsis:       sys/modules/exec_elf32 from 10 hours ago fails to build with clang
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 16 10:15:01 +0000 2019
>Originator:     ng0
>Release:        current, ~1 AM CET
>Organization:
>Environment:
NetBSD uptimegirl 9.99.10 NetBSD 9.99.10 (GENERIC) amd64

>Description:
In file included from /usr/src/sys/kern/exec_elf32.c:39:
/usr/src/sys/kern/exec_elf.c:229:7: error: variable 'execname' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
                if (path[0] == '/' && path[1] != '\0') {
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/exec_elf.c:248:6: note: uninitialized use occurs here
        if (execname) {
            ^~~~~~~~
/usr/src/sys/kern/exec_elf.c:229:3: note: remove the 'if' if its condition is always true
                if (path[0] == '/' && path[1] != '\0') {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/kern/exec_elf.c:229:7: error: variable 'execname' is used uninitialized whenever '&&' condition is false [-Werror,-Wsometimes-uninitialized]
                if (path[0] == '/' && path[1] != '\0') {
                    ^~~~~~~~~~~~~~
/usr/src/sys/kern/exec_elf.c:248:6: note: uninitialized use occurs here
        if (execname) {
            ^~~~~~~~
/usr/src/sys/kern/exec_elf.c:229:7: note: remove the '&&' if its condition is always true
                if (path[0] == '/' && path[1] != '\0') {
                    ^~~~~~~~~~~~~~~~~
/usr/src/sys/kern/exec_elf.c:158:44: note: initialize the variable 'execname' to silence this warning
        AuxInfo ai[ELF_AUX_ENTRIES], *a, *execname;
                                                  ^
                                                   = NULL
2 errors generated.

*** Failed target:  exec_elf32.o
*** Failed command: /usr/src/../tools/bin/x86_64--netbsd-clang -O2 -g -std=gnu99 -Wno-sign-compare -Wno-pointer-sign -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Werror -Wno-error=address-of-packed-member -Wno-error=constant-conversion -ffreestanding -fno-strict-aliasing -Wno-pointer-sign -mno-red-zone -mno-mmx -mno-sse -mno-avx -msoft-float -mcmodel=kernel -fno-omit-frame-pointer -I/usr/src/common/include -DDIAGNOSTIC --sysroot=/usr/src/../obj/destdir.amd64 -DEXEC_ELF32 -DCOREDUMP -DPAX_ASLR -I/usr/src/common/include -DDIAGNOSTIC -nostdinc -I. -I/usr/src/sys/modules/exec_elf32 -isystem /usr/src/sys -isystem /usr/src/sys/arch -isystem /usr/src/sys/../common/include -D_KERNEL -D_LKM -D_MODULE -DSYSCTL_INCLUDE_DESCR -c /usr/src/sys/kern/exec_elf32.c
*** Error code 1

Stop.
nbmake[7]: stopped in /usr/src/sys/modules/exec_elf32

*** Failed target:  dependall
*** Failed command: cd "/usr/src/sys/modules/exec_elf32"; /usr/src/../tools/bin/nbmake realall
*** Error code 1

Stop.
nbmake[6]: stopped in /usr/src/sys/modules/exec_elf32

*** Failed target:  dependall-exec_elf32
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="sys/modules/"; real="/usr/src/sys/modules" ;; *) this="sys/modules/${dir}/"; real="/usr/src/sys/modules/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget exec_elf32 dependall
*** Error code 1

Stop.
nbmake[5]: stopped in /usr/src/sys/modules

*** Failed target:  dependall-modules
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="sys/"; real="/usr/src/sys" ;; *) this="sys/${dir}/"; real="/usr/src/sys/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget modules dependall
*** Error code 1

Stop.
nbmake[4]: stopped in /usr/src/sys

*** Failed target:  dependall-sys
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/usr/src" ;; *) this="${dir}/"; real="/usr/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget sys dependall
*** Error code 1

Stop.
nbmake[3]: stopped in /usr/src

*** Failed target:  do-build
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/usr/src" ;; *) this="${dir}/"; real="/usr/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . dependall BUILD_tools=no BUILD_lib=no
*** Error code 1

Stop.
nbmake[2]: stopped in /usr/src

*** Failed target:  build
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/usr/src" ;; *) this="${dir}/"; real="/usr/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . do-build
*** Error code 1

Stop.
nbmake[1]: stopped in /usr/src

*** Failed target:  distribution
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/usr/src" ;; *) this="${dir}/"; real="/usr/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/src/../tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . build NOPOSTINSTALL=1
*** Error code 1

Stop.
nbmake: stopped in /usr/src

ERROR: Failed to make distribution
*** BUILD ABORTED ***

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index