FYI, we noticed the following commit (built with gcc-8): commit: e483b0208784146864a2c195e316230647e9d297 ("proc: test /proc/*/maps, smaps, smaps_rollup, statm") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master in testcase: kernel_selftests with following parameters: group: kselftests-02 test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel. test-url: https://www.kernel.org/doc/Documentation/kselftest.txt on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 4G caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): KERNEL SELFTESTS: linux_headers_dir is /usr/src/linux-headers-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297 2019-03-08 13:51:08 ln -sf /usr/bin/clang-7 /usr/bin/clang 2019-03-08 13:51:08 ln -sf /usr/bin/llc-7 /usr/bin/llc 2019-03-08 13:56:30 make run_tests -C proc make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc' gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE fd-001-lookup.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/fd-001-lookup gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE fd-002-posix-eq.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/fd-002-posix-eq gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE fd-003-kthread.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/fd-003-kthread gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE proc-loadavg-001.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/proc-loadavg-001 proc-loadavg-001.c:17:0: warning: "_GNU_SOURCE" redefined #define _GNU_SOURCE :0:0: note: this is the location of the previous definition gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE proc-pid-vm.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/proc-pid-vm gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE proc-self-map-files-001.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/proc-self-map-files-001 gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE proc-self-map-files-002.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/proc-self-map-files-002 gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE proc-self-syscall.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/proc-self-syscall proc-self-syscall.c:16:0: warning: "_GNU_SOURCE" redefined #define _GNU_SOURCE :0:0: note: this is the location of the previous definition gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE proc-self-wchan.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/proc-self-wchan gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE proc-uptime-001.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/proc-uptime-001 gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE proc-uptime-002.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/proc-uptime-002 proc-uptime-002.c:18:0: warning: "_GNU_SOURCE" redefined #define _GNU_SOURCE :0:0: note: this is the location of the previous definition gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE read.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/read gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE self.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/self gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE setns-dcache.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/setns-dcache gcc -Wall -O2 -Wno-unused-function -D_GNU_SOURCE thread-self.c -o /usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc/thread-self TAP version 13 selftests: proc: fd-001-lookup ======================================== ok 1..1 selftests: proc: fd-001-lookup [PASS] selftests: proc: fd-002-posix-eq ======================================== ok 1..2 selftests: proc: fd-002-posix-eq [PASS] selftests: proc: fd-003-kthread ======================================== ok 1..3 selftests: proc: fd-003-kthread [PASS] selftests: proc: proc-loadavg-001 ======================================== ok 1..4 selftests: proc: proc-loadavg-001 [PASS] selftests: proc: proc-pid-vm ======================================== proc-pid-vm: proc-pid-vm.c:277: main: Assertion `rv == strlen(buf0)' failed. Aborted not ok 1..5 selftests: proc: proc-pid-vm [FAIL] selftests: proc: proc-self-map-files-001 ======================================== ok 1..6 selftests: proc: proc-self-map-files-001 [PASS] selftests: proc: proc-self-map-files-002 ======================================== ok 1..7 selftests: proc: proc-self-map-files-002 [PASS] selftests: proc: proc-self-syscall ======================================== ok 1..8 selftests: proc: proc-self-syscall [PASS] selftests: proc: proc-self-wchan ======================================== ok 1..9 selftests: proc: proc-self-wchan [PASS] selftests: proc: proc-uptime-001 ======================================== ok 1..10 selftests: proc: proc-uptime-001 [PASS] selftests: proc: proc-uptime-002 ======================================== ok 1..11 selftests: proc: proc-uptime-002 [PASS] selftests: proc: read ======================================== ok 1..12 selftests: proc: read [PASS] selftests: proc: self ======================================== ok 1..13 selftests: proc: self [PASS] selftests: proc: setns-dcache ======================================== ok 1..14 selftests: proc: setns-dcache [PASS] selftests: proc: thread-self ======================================== ok 1..15 selftests: proc: thread-self [PASS] make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.6-e483b0208784146864a2c195e316230647e9d297/tools/testing/selftests/proc' To reproduce: # build kernel cd linux cp config-5.0.0-03428-ge483b02 .config make HOSTCC=gcc-8 CC=gcc-8 ARCH=x86_64 olddefconfig make HOSTCC=gcc-8 CC=gcc-8 ARCH=x86_64 prepare make HOSTCC=gcc-8 CC=gcc-8 ARCH=x86_64 modules_prepare make HOSTCC=gcc-8 CC=gcc-8 ARCH=x86_64 SHELL=/bin/bash make HOSTCC=gcc-8 CC=gcc-8 ARCH=x86_64 bzImage git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp qemu -k job-script # job-script is attached in this email Thanks, Rong Chen