https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64170

            Bug ID: 64170
           Summary: [5 Regression] ICE compiling Linux Kernel
                    drivers/media/rc/imon.c in imon_incoming_packet
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sasha.levin at oracle dot com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org,
                    y.gribov at samsung dot com, ygribov at gcc dot gnu.org

Created attachment 34180
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34180&action=edit
Preprocessed source

I'm seeing the following failure:

$ gcc -v -Wp,-MD,drivers/media/rc/.imon.o.d  -nostdinc -isystem
/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include
-I./arch/x86/include -Iarch/x86/include/generated  -Iinclude
-I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64
-mno-80387 -mno-fp-ret-in-387 -march=native -mno-red-zone -mcmodel=kernel
-funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1
-DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1
-pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2
--param=allow-store-data-races=0 -fno-reorder-blocks -fno-ipa-cp-clone
-fno-partial-inlining -Wframe-larger-than=2048 -fstack-protector
-Wno-unused-but-set-variable -fno-omit-frame-pointer
-fno-optimize-sibling-calls -fno-var-tracking-assignments -g -gdwarf-4 -pg
-mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign
-fno-strict-overflow -fconserve-stack -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO   
-fsanitize=kernel-address -fasan-shadow-offset=0xdfffe90000000000 --param
asan-instrumentation-with-call-threshold=10000   -fsanitize=undefined 
-fno-sanitize=unreachable  -fno-sanitize=float-cast-overflow   
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(imon)" 
-D"KBUILD_MODNAME=KBUILD_STR(imon)" -c -o drivers/media/rc/.tmp_imon.o
drivers/media/rc/imon.c

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c
Thread model: posix
gcc version 5.0.0 20141203 (experimental) (GCC) 

COLLECT_GCC_OPTIONS='-v' '-nostdinc' '-isystem'
'/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include' '-I'
'./arch/x86/include' '-I' 'arch/x86/include/generated' '-I' 'include' '-I'
'./arch/x86/include/uapi' '-I' 'arch/x86/include/generated/uapi' '-I'
'./include/uapi' '-I' 'include/generated/uapi' '-include'
'./include/linux/kconfig.h' '-D' '__KERNEL__' '-Wall' '-Wundef'
'-Wstrict-prototypes' '-Wno-trigraphs' '-fno-strict-aliasing' '-fno-common'
'-Werror=implicit-function-declaration' '-Wno-format-security' '-std=gnu90'
'-m64' '-mno-80387' '-mno-fp-ret-in-387' '-march=native' '-mno-red-zone'
'-mcmodel=kernel' '-funit-at-a-time' '-maccumulate-outgoing-args' '-D'
'CONFIG_X86_X32_ABI' '-D' 'CONFIG_AS_CFI=1' '-D' 'CONFIG_AS_CFI_SIGNAL_FRAME=1'
'-D' 'CONFIG_AS_CFI_SECTIONS=1' '-D' 'CONFIG_AS_FXSAVEQ=1' '-D'
'CONFIG_AS_CRC32=1' '-D' 'CONFIG_AS_AVX=1' '-D' 'CONFIG_AS_AVX2=1' '-pipe'
'-Wno-sign-compare' '-fno-asynchronous-unwind-tables' '-mno-sse' '-mno-mmx'
'-mno-sse2' '-mno-3dnow' '-mno-avx' '-fno-delete-null-pointer-checks' '-O2'
'--param' 'allow-store-data-races=0' '-fno-reorder-blocks' '-fno-ipa-cp-clone'
'-fno-partial-inlining' '-Wframe-larger-than=2048' '-fstack-protector'
'-Wno-unused-but-set-variable' '-fno-omit-frame-pointer'
'-fno-optimize-sibling-calls' '-fno-var-tracking-assignments' '-g' '-gdwarf-4'
'-pg' '-mfentry' '-D' 'CC_USING_FENTRY' '-Wdeclaration-after-statement'
'-Wno-pointer-sign' '-fno-strict-overflow' '-fconserve-stack'
'-Werror=implicit-int' '-Werror=strict-prototypes' '-Werror=date-time' '-D'
'CC_HAVE_ASM_GOTO' '-fsanitize=kernel-address'
'-fasan-shadow-offset=0xdfffe90000000000' '--param'
'asan-instrumentation-with-call-threshold=10000' '-fsanitize=undefined'
'-fno-sanitize=unreachable' '-fno-sanitize=float-cast-overflow' '-D'
'KBUILD_STR(s)=#s' '-D' 'KBUILD_BASENAME=KBUILD_STR(imon)' '-D'
'KBUILD_MODNAME=KBUILD_STR(imon)' '-c' '-o' 'drivers/media/rc/.tmp_imon.o'
 /home/sasha/gcc-inst/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/cc1 -quiet
-nostdinc -v -I ./arch/x86/include -I arch/x86/include/generated -I include -I
./arch/x86/include/uapi -I arch/x86/include/generated/uapi -I ./include/uapi -I
include/generated/uapi -imultiarch x86_64-linux-gnu -D __KERNEL__ -D
CONFIG_X86_X32_ABI -D CONFIG_AS_CFI=1 -D CONFIG_AS_CFI_SIGNAL_FRAME=1 -D
CONFIG_AS_CFI_SECTIONS=1 -D CONFIG_AS_FXSAVEQ=1 -D CONFIG_AS_CRC32=1 -D
CONFIG_AS_AVX=1 -D CONFIG_AS_AVX2=1 -D CC_USING_FENTRY -D CC_HAVE_ASM_GOTO -D
KBUILD_STR(s)=#s -D KBUILD_BASENAME=KBUILD_STR(imon) -D
KBUILD_MODNAME=KBUILD_STR(imon) -isystem
/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include -include
./include/linux/kconfig.h -MD drivers/media/rc/.imon.o.d
drivers/media/rc/imon.c -march=nehalem -mmmx -mno-3dnow -msse -msse2 -msse3
-mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul
-mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2
-mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle
-mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr
-mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf
-mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq
-mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb
-mno-pcommit --param l1-cache-size=32 --param l1-cache-line-size=64 --param
l2-cache-size=24576 -mtune=nehalem -quiet -dumpbase imon.c -m64 -mno-80387
-mno-fp-ret-in-387 -mno-red-zone -mcmodel=kernel -maccumulate-outgoing-args
-mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mfentry -auxbase-strip
drivers/media/rc/.tmp_imon.o -g -gdwarf-4 -O2 -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -Werror=implicit-function-declaration -Wno-format-security
-Wno-sign-compare -Wframe-larger-than=2048 -Wno-unused-but-set-variable
-Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -std=gnu90 -version -p
-fno-strict-aliasing -fno-common -funit-at-a-time
-fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks
-fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -fstack-protector
-fno-omit-frame-pointer -fno-optimize-sibling-calls
-fno-var-tracking-assignments -fno-strict-overflow -fconserve-stack
-fsanitize=kernel-address -fasan-shadow-offset=0xdfffe90000000000
-fsanitize=undefined -fno-sanitize=unreachable
-fno-sanitize=float-cast-overflow --param allow-store-data-races=0 --param
asan-instrumentation-with-call-threshold=10000 -o - |
 as -v -I ./arch/x86/include -I arch/x86/include/generated -I include -I
./arch/x86/include/uapi -I arch/x86/include/generated/uapi -I ./include/uapi -I
include/generated/uapi --64 -o drivers/media/rc/.tmp_imon.o
GNU assembler version 2.24 (x86_64-linux-gnu) using BFD version (GNU Binutils
for Debian) 2.24
GNU C89 (GCC) version 5.0.0 20141203 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 5.0.0 20141203 (experimental), GMP version 5.0.5,
MPFR version 3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
#include "..." search starts here:
#include <...> search starts here:
 ./arch/x86/include
 arch/x86/include/generated
 include
 ./arch/x86/include/uapi
 arch/x86/include/generated/uapi
 ./include/uapi
 include/generated/uapi
 /home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include
End of search list.
GNU C89 (GCC) version 5.0.0 20141203 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 5.0.0 20141203 (experimental), GMP version 5.0.5,
MPFR version 3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: b5ec4e8b98e67ea0af021f7c5845f9e4
drivers/media/rc/imon.c: In function ‘imon_incoming_packet’:
drivers/media/rc/imon.c:1588:13: internal compiler error: in
can_remove_asan_check, at sanopt.c:351
 static void imon_incoming_packet(struct imon_context *ictx,
             ^
0xaf7830 can_remove_asan_check
    ../../gcc/sanopt.c:351
0xaf85df maybe_optimize_asan_check_ifn
    ../../gcc/sanopt.c:433
0xaf85df sanopt_optimize_walker
    ../../gcc/sanopt.c:493
0xaf793a sanopt_optimize_walker
    ../../gcc/sanopt.c:526
0xaf793a sanopt_optimize_walker
    ../../gcc/sanopt.c:526
0xaf793a sanopt_optimize_walker
    ../../gcc/sanopt.c:526
0xaf9431 sanopt_optimize
    ../../gcc/sanopt.c:549
0xaf9431 execute
    ../../gcc/sanopt.c:596
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


Bisected down to:


commit 977a4cdff6ddcd6d890d45b81c1a1b8fa92f6d54
Author: ygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed Dec 3 09:23:28 2014 +0000

    Improve optimization of ASan checks.

    2014-12-03  Yury Gribov  <y.gri...@samsung.com>

    gcc/
        * sanopt.c (maybe_get_single_definition): New function.
        (maybe_get_dominating_check): Ditto.
        (can_remove_asan_check): Ditto.
        (struct tree_map_traits): New struct.
        (struct sanopt_ctx): Use custom traits for asan_check_map.
        (maybe_optimize_ubsan_null_ifn): Move code to
        maybe_get_dominating_check.
        (maybe_optimize_asan_check_ifn): Move code and take non-SSA expressions
        into account when optimizing.
        (sanopt_optimize_walker): Optimize ASan checks even when
        recovering.


    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218304
138bc75d-0d04-0410-961f-82ee72b054a4


Preprocessed source attached.

Reply via email to