[Bug tree-optimization/84946] New: UBSAN: in mem_valid_for_store_merging ../../gcc/gimple-ssa-store-merging.c:3951

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 19 08:08:00 GMT 2018


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

            Bug ID: 84946
           Summary: UBSAN: in mem_valid_for_store_merging
                    ../../gcc/gimple-ssa-store-merging.c:3951
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Following causes UBSAN:

$ ./xgcc -B. -mavx512f -O2 
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/pr82389.c
../../gcc/poly-int.h:845:5: runtime error: signed integer overflow:
9223372034573074432 + 8589934592 cannot be represented in type 'long int'
    #0 0x38fd659 in poly_int<1u, poly_result<long, long,
poly_coeff_pair_traits<long, long>::result_kind>::type> operator+<1u, long,
long>(poly_int_pod<1u, long> const&, poly_int_pod<1u, long> const&)
../../gcc/poly-int.h:845
    #1 0x38fd659 in mem_valid_for_store_merging
../../gcc/gimple-ssa-store-merging.c:3951
    #2 0x3908e85 in process_store ../../gcc/gimple-ssa-store-merging.c:4043
    #3 0x3908e85 in execute ../../gcc/gimple-ssa-store-merging.c:4279
    #4 0x18f5250 in execute_one_pass(opt_pass*) ../../gcc/passes.c:2497
    #5 0x18f85bb in execute_pass_list_1 ../../gcc/passes.c:2586
    #6 0x18f85e4 in execute_pass_list_1 ../../gcc/passes.c:2587
    #7 0x18f8674 in execute_pass_list(function*, opt_pass*)
../../gcc/passes.c:2597
    #8 0xbe01ae in cgraph_node::expand() ../../gcc/cgraphunit.c:2139
    #9 0xbe4f7d in expand_all_functions ../../gcc/cgraphunit.c:2275
    #10 0xbe4f7d in symbol_table::compile() ../../gcc/cgraphunit.c:2624
    #11 0xbeee87 in symbol_table::compile() ../../gcc/cgraphunit.c:2720
    #12 0xbeee87 in symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2717
    #13 0x1d100a8 in compile_file ../../gcc/toplev.c:480
    #14 0x639d9c in do_compile ../../gcc/toplev.c:2132
    #15 0x639d9c in toplev::main(int, char**) ../../gcc/toplev.c:2267
    #16 0x63c7fa in main ../../gcc/main.c:39
    #17 0x7ffff5cafa86 in __libc_start_main (/lib64/libc.so.6+0x21a86)
    #18 0x63c929 in _start
(/home/marxin/Programming/gcc/objdir2/gcc/cc1+0x63c929)


More information about the Gcc-bugs mailing list