public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind
@ 2014-10-10  6:34 trippels at gcc dot gnu.org
  2014-10-10  7:35 ` [Bug other/63504] " rguenth at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-10  6:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63504
           Summary: [5 Regression] Issues found by
                    --enable-checking=valgrind
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org

(Ordered by first occurrence in log.)

1)
==53187== Use of uninitialised value of size 8
==53187==    at 0x102929D0: find_slot_with_hash (hash-table.h:860)
==53187==    by 0x102929D0: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24142)
==53187==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==53187==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==53187==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==53187==    by 0x102B6E8F: optimize_location_lists (dwarf2out.c:24192)
==53187==    by 0x102B6E8F: dwarf2out_finish(char const*) (dwarf2out.c:24453)
==53187==    by 0x1058A43F: compile_file() (toplev.c:602)
==53187==    by 0x1058C7AF: do_compile (toplev.c:1946)
==53187==    by 0x1058C7AF: toplev_main(int, char**) (toplev.c:2022)
==53187==    by 0x100E131F: main (main.c:36)
==53187==  Uninitialised value was created by a stack allocation
==53187==    at 0x102B8A70: generic_wide_int<wide_int_storage>&
generic_wide_int<wide_int_storage>::operator=<std::pair<rtx_def*, machine_mode>
>(std::pair<rtx_def*, machine_mode> const&) (wide-int.h:861)
==53187== 
==53187== Use of uninitialised value of size 8
==53187==    at 0x10293100: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24144)
==53187==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==53187==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==53187==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==53187==    by 0x102B6E8F: optimize_location_lists (dwarf2out.c:24192)
==53187==    by 0x102B6E8F: dwarf2out_finish(char const*) (dwarf2out.c:24453)
==53187==    by 0x1058A43F: compile_file() (toplev.c:602)
==53187==    by 0x1058C7AF: do_compile (toplev.c:1946)
==53187==    by 0x1058C7AF: toplev_main(int, char**) (toplev.c:2022)
==53187==    by 0x100E131F: main (main.c:36)
==53187==  Uninitialised value was created by a stack allocation
==53187==    at 0x102B8A70: generic_wide_int<wide_int_storage>&
generic_wide_int<wide_int_storage>::operator=<std::pair<rtx_def*, machine_mode>
>(std::pair<rtx_def*, machine_mode> const&) (wide-int.h:861)
==53187== 

variation:==18094== Use of uninitialised value of size 8
==18094==    at 0x102929D0: find_slot_with_hash (hash-table.h:860)
==18094==    by 0x102929D0: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24142)
==18094==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==18094==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==18094==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==18094==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==18094==    by 0x102B6E8F: optimize_location_lists (dwarf2out.c:24192)
==18094==    by 0x102B6E8F: dwarf2out_finish(char const*) (dwarf2out.c:24453)
==18094==    by 0x1058A43F: compile_file() (toplev.c:602)
==18094==    by 0x1058C7AF: do_compile (toplev.c:1946)
==18094==    by 0x1058C7AF: toplev_main(int, char**) (toplev.c:2022)
==18094==    by 0x100E131F: main (main.c:36)
==18094==  Uninitialised value was created by a client request
==18094==    at 0x101B1898: pool_alloc(alloc_pool_def*) (alloc-pool.c:298)
==18094==    by 0x103F727F: ira_create_allocno(int, bool, ira_loop_tree_node*)
(ira-build.c:495)
==18094==    by 0x103F7793: create_insn_allocnos(rtx_def*, rtx_def*, bool)
(ira-build.c:1882)
==18094==    by 0x103F7BEB: create_bb_allocnos (ira-build.c:1948)
==18094==    by 0x103F7BEB: create_loop_tree_node_allocnos(ira_loop_tree_node*)
(ira-build.c:1994)
==18094==    by 0x103FC36B: ira_traverse_loop_tree(bool, ira_loop_tree_node*,
void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*))
(ira-build.c:1829)
==18094==    by 0x103FC153: ira_traverse_loop_tree(bool, ira_loop_tree_node*,
void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*))
(ira-build.c:1847)
==18094==    by 0x103FC153: ira_traverse_loop_tree(bool, ira_loop_tree_node*,
void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*))
(ira-build.c:1847)
==18094==    by 0x103FCDB7: create_allocnos (ira-build.c:2091)
==18094==    by 0x103FCDB7: ira_build() (ira-build.c:3449)
==18094==    by 0x103F2B17: ira (ira.c:5166)
==18094==    by 0x103F2B17: (anonymous namespace)::pass_ira::execute(function*)
(ira.c:5431)
==18094==    by 0x104B5DC7: execute_one_pass(opt_pass*) (passes.c:2151)
==18094==    by 0x104B6463: execute_pass_list_1(opt_pass*) (passes.c:2203)
==18094==    by 0x104B647B: execute_pass_list_1(opt_pass*) (passes.c:2204)
==18094== 
==18094== Use of uninitialised value of size 8
==18094==    at 0x10293100: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24144)
==18094==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==18094==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==18094==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==18094==    by 0x102927A3: optimize_location_lists_1(die_struct*,
hash_table<loc_list_hasher, xcallocator, false>*) [clone .isra.249]
(dwarf2out.c:24149)
==18094==    by 0x102B6E8F: optimize_location_lists (dwarf2out.c:24192)
==18094==    by 0x102B6E8F: dwarf2out_finish(char const*) (dwarf2out.c:24453)
==18094==    by 0x1058A43F: compile_file() (toplev.c:602)
==18094==    by 0x1058C7AF: do_compile (toplev.c:1946)
==18094==    by 0x1058C7AF: toplev_main(int, char**) (toplev.c:2022)
==18094==    by 0x100E131F: main (main.c:36)
==18094==  Uninitialised value was created by a client request
==18094==    at 0x101B1898: pool_alloc(alloc_pool_def*) (alloc-pool.c:298)
==18094==    by 0x103F727F: ira_create_allocno(int, bool, ira_loop_tree_node*)
(ira-build.c:495)
==18094==    by 0x103F7793: create_insn_allocnos(rtx_def*, rtx_def*, bool)
(ira-build.c:1882)
==18094==    by 0x103F7BEB: create_bb_allocnos (ira-build.c:1948)
==18094==    by 0x103F7BEB: create_loop_tree_node_allocnos(ira_loop_tree_node*)
(ira-build.c:1994)
==18094==    by 0x103FC36B: ira_traverse_loop_tree(bool, ira_loop_tree_node*,
void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*))
(ira-build.c:1829)
==18094==    by 0x103FC153: ira_traverse_loop_tree(bool, ira_loop_tree_node*,
void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*))
(ira-build.c:1847)
==18094==    by 0x103FC153: ira_traverse_loop_tree(bool, ira_loop_tree_node*,
void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*))
(ira-build.c:1847)
==18094==    by 0x103FCDB7: create_allocnos (ira-build.c:2091)
==18094==    by 0x103FCDB7: ira_build() (ira-build.c:3449)
==18094==    by 0x103F2B17: ira (ira.c:5166)
==18094==    by 0x103F2B17: (anonymous namespace)::pass_ira::execute(function*)
(ira.c:5431)
==18094==    by 0x104B5DC7: execute_one_pass(opt_pass*) (passes.c:2151)
==18094==    by 0x104B6463: execute_pass_list_1(opt_pass*) (passes.c:2203)
==18094==    by 0x104B647B: execute_pass_list_1(opt_pass*) (passes.c:2204)
==18094== 

2)==24993== Conditional jump or move depends on uninitialised value(s)
==24993==    at 0x1080E8CC: divmod_internal_2 (wide-int.cc:1623)
==24993==    by 0x1080E8CC: wi::divmod_internal(long*, unsigned int*, long*,
long const*, unsigned int, unsigned int, long const*, unsigned int, unsigned
int, signop_e, bool*
) (wide-int.cc:1823)
==24993==    by 0x103132C7: div_trunc<const tree_node*,
generic_wide_int<wide_int_storage> > (wide-int.h:2506)
==24993==    by 0x103132C7: int_const_binop_1(tree_code, tree_node const*,
tree_node const*, int) (fold-const.c:1038)
==24993==    by 0x1079BC6F: vrp_int_const_binop(tree_code, tree_node*,
tree_node*) (tree-vrp.c:1934)
==24993==    by 0x1079C2EB:
extract_range_from_multiplicative_op_1(value_range_d*, tree_code,
value_range_d*, value_range_d*) (tree-vrp.c:2218)
==24993==    by 0x107A06CF: extract_range_from_binary_expr_1(value_range_d*,
tree_code, tree_node*, value_range_d*, value_range_d*) (tree-vrp.c:3117)
==24993==    by 0x1079FCC7: extract_range_from_binary_expr_1(value_range_d*,
tree_code, tree_node*, value_range_d*, value_range_d*) (tree-vrp.c:2397)
==24993==    by 0x107A2E57: extract_range_from_binary_expr(value_range_d*,
tree_code, tree_node*, tree_node*, tree_node*) (tree-vrp.c:3293)
==24993==    by 0x107A6373: extract_range_from_assignment(value_range_d*,
gimple_statement_base*) (tree-vrp.c:4003)
==24993==    by 0x107A8227: vrp_visit_assignment_or_call (tree-vrp.c:6920)
==24993==    by 0x107A8227: vrp_visit_stmt(gimple_statement_base*, edge_def**,
tree_node**) (tree-vrp.c:7731)
==24993==    by 0x106DEC97: simulate_stmt(gimple_statement_base*)
(tree-ssa-propagate.c:331)
==24993==    by 0x106E153F: simulate_block (tree-ssa-propagate.c:454)
==24993==    by 0x106E153F: ssa_propagate(ssa_prop_result
(*)(gimple_statement_base*, edge_def**, tree_node**), ssa_prop_result
(*)(gimple_statement_base*)) (tree-ssa-propaga
te.c:871)
==24993==    by 0x107B063F: execute_vrp (tree-vrp.c:9994)
==24993==    by 0x107B063F: (anonymous namespace)::pass_vrp::execute(function*)
(tree-vrp.c:10074)
==24993==  Uninitialised value was created by a stack allocation
==24993==    at 0x1080E418: wi::divmod_internal(long*, unsigned int*, long*,
long const*, unsigned int, unsigned int, long const*, unsigned int, unsigned
int, signop_e, bool*
) (wide-int.cc:1683)
==24993== 
==24993== Conditional jump or move depends on uninitialised value(s)
==24993==    at 0x1080E8E4: divmod_internal_2 (wide-int.cc:1623)
==24993==    by 0x1080E8E4: wi::divmod_internal(long*, unsigned int*, long*,
long const*, unsigned int, unsigned int, long const*, unsigned int, unsigned
int, signop_e, bool*
) (wide-int.cc:1823)
==24993==    by 0x103132C7: div_trunc<const tree_node*,
generic_wide_int<wide_int_storage> > (wide-int.h:2506)
==24993==    by 0x103132C7: int_const_binop_1(tree_code, tree_node const*,
tree_node const*, int) (fold-const.c:1038)
==24993==    by 0x1079BC6F: vrp_int_const_binop(tree_code, tree_node*,
tree_node*) (tree-vrp.c:1934)
==24993==    by 0x1079C2EB:
extract_range_from_multiplicative_op_1(value_range_d*, tree_code,
value_range_d*, value_range_d*) (tree-vrp.c:2218)
==24993==    by 0x107A06CF: extract_range_from_binary_expr_1(value_range_d*,
tree_code, tree_node*, value_range_d*, value_range_d*) (tree-vrp.c:3117)
==24993==    by 0x1079FCC7: extract_range_from_binary_expr_1(value_range_d*,
tree_code, tree_node*, value_range_d*, value_range_d*) (tree-vrp.c:2397)
==24993==    by 0x107A2E57: extract_range_from_binary_expr(value_range_d*,
tree_code, tree_node*, tree_node*, tree_node*) (tree-vrp.c:3293)
==24993==    by 0x107A6373: extract_range_from_assignment(value_range_d*,
gimple_statement_base*) (tree-vrp.c:4003)
==24993==    by 0x107A8227: vrp_visit_assignment_or_call (tree-vrp.c:6920)
==24993==    by 0x107A8227: vrp_visit_stmt(gimple_statement_base*, edge_def**,
tree_node**) (tree-vrp.c:7731)
==24993==    by 0x106DEC97: simulate_stmt(gimple_statement_base*)
(tree-ssa-propagate.c:331)
==24993==    by 0x106E153F: simulate_block (tree-ssa-propagate.c:454)
==24993==    by 0x106E153F: ssa_propagate(ssa_prop_result
(*)(gimple_statement_base*, edge_def**, tree_node**), ssa_prop_result
(*)(gimple_statement_base*)) (tree-ssa-propagate.c:871)
==24993==    by 0x107B063F: execute_vrp (tree-vrp.c:9994)
==24993==    by 0x107B063F: (anonymous namespace)::pass_vrp::execute(function*)
(tree-vrp.c:10074)
==24993==  Uninitialised value was created by a stack allocation
==24993==    at 0x1080E418: wi::divmod_internal(long*, unsigned int*, long*,
long const*, unsigned int, unsigned int, long const*, unsigned int, unsigned
int, signop_e, bool*) (wide-int.cc:1683)
==24993== 
==24993== Conditional jump or move depends on uninitialised value(s)
==24993==    at 0x1080E964: divmod_internal_2 (wide-int.cc:1645)
==24993==    by 0x1080E964: wi::divmod_internal(long*, unsigned int*, long*,
long const*, unsigned int, unsigned int, long const*, unsigned int, unsigned
int, signop_e, bool*) (wide-int.cc:1823)
==24993==    by 0x103132C7: div_trunc<const tree_node*,
generic_wide_int<wide_int_storage> > (wide-int.h:2506)
==24993==    by 0x103132C7: int_const_binop_1(tree_code, tree_node const*,
tree_node const*, int) (fold-const.c:1038)
==24993==    by 0x1079BC6F: vrp_int_const_binop(tree_code, tree_node*,
tree_node*) (tree-vrp.c:1934)
==24993==    by 0x1079C2EB:
extract_range_from_multiplicative_op_1(value_range_d*, tree_code,
value_range_d*, value_range_d*) (tree-vrp.c:2218)
==24993==    by 0x107A06CF: extract_range_from_binary_expr_1(value_range_d*,
tree_code, tree_node*, value_range_d*, value_range_d*) (tree-vrp.c:3117)
==24993==    by 0x1079FCC7: extract_range_from_binary_expr_1(value_range_d*,
tree_code, tree_node*, value_range_d*, value_range_d*) (tree-vrp.c:2397)
==24993==    by 0x107A2E57: extract_range_from_binary_expr(value_range_d*,
tree_code, tree_node*, tree_node*, tree_node*) (tree-vrp.c:3293)
==24993==    by 0x107A6373: extract_range_from_assignment(value_range_d*,
gimple_statement_base*) (tree-vrp.c:4003)
==24993==    by 0x107A8227: vrp_visit_assignment_or_call (tree-vrp.c:6920)
==24993==    by 0x107A8227: vrp_visit_stmt(gimple_statement_base*, edge_def**,
tree_node**) (tree-vrp.c:7731)
==24993==    by 0x106DEC97: simulate_stmt(gimple_statement_base*)
(tree-ssa-propagate.c:331)
==24993==    by 0x106E153F: simulate_block (tree-ssa-propagate.c:454)
==24993==    by 0x106E153F: ssa_propagate(ssa_prop_result
(*)(gimple_statement_base*, edge_def**, tree_node**), ssa_prop_result
(*)(gimple_statement_base*)) (tree-ssa-propagate.c:871)
==24993==    by 0x107B063F: execute_vrp (tree-vrp.c:9994)
==24993==    by 0x107B063F: (anonymous namespace)::pass_vrp::execute(function*)
(tree-vrp.c:10074)
==24993==  Uninitialised value was created by a stack allocation
==24993==    at 0x1080E418: wi::divmod_internal(long*, unsigned int*, long*,
long const*, unsigned int, unsigned int, long const*, unsigned int, unsigned
int, signop_e, bool*) (wide-int.cc:1683)
==24993== 
==24993== Conditional jump or move depends on uninitialised value(s)
==24993==    at 0x10809E8C: canonize(long*, unsigned int, unsigned int)
(wide-int.cc:109)
==24993==    by 0x1080E9DB: wi::divmod_internal(long*, unsigned int*, long*,
long const*, unsigned int, unsigned int, long const*, unsigned int, unsigned
int, signop_e, bool*) (wide-int.cc:1829)
==24993==    by 0x1079BC6F: vrp_int_const_binop(tree_code, tree_node*,
tree_node*) (tree-vrp.c:1934)
==24993==    by 0x1079C2EB:
extract_range_from_multiplicative_op_1(value_range_d*, tree_code,
value_range_d*, value_range_d*) (tree-vrp.c:2218)
==24993==    by 0x107A06CF: extract_range_from_binary_expr_1(value_range_d*,
tree_code, tree_node*, value_range_d*, value_range_d*) (tree-vrp.c:3117)
==24993==    by 0x1079FCC7: extract_range_from_binary_expr_1(value_range_d*,
tree_code, tree_node*, value_range_d*, value_range_d*) (tree-vrp.c:2397)
==24993==    by 0x107A2E57: extract_range_from_binary_expr(value_range_d*,
tree_code, tree_node*, tree_node*, tree_node*) (tree-vrp.c:3293)
==24993==    by 0x107A6373: extract_range_from_assignment(value_range_d*,
gimple_statement_base*) (tree-vrp.c:4003)
==24993==    by 0x107A8227: vrp_visit_assignment_or_call (tree-vrp.c:6920)
==24993==    by 0x107A8227: vrp_visit_stmt(gimple_statement_base*, edge_def**,
tree_node**) (tree-vrp.c:7731)
==24993==    by 0x106DEC97: simulate_stmt(gimple_statement_base*)
(tree-ssa-propagate.c:331)
==24993==    by 0x106E153F: simulate_block (tree-ssa-propagate.c:454)
==24993==    by 0x106E153F: ssa_propagate(ssa_prop_result
(*)(gimple_statement_base*, edge_def**, tree_node**), ssa_prop_result
(*)(gimple_statement_base*)) (tree-ssa-propagate.c:871)
==24993==    by 0x107B063F: execute_vrp (tree-vrp.c:9994)
==24993==    by 0x107B063F: (anonymous namespace)::pass_vrp::execute(function*)
(tree-vrp.c:10074)
==24993==  Uninitialised value was created by a stack allocation
==24993==    at 0x1080E418: wi::divmod_internal(long*, unsigned int*, long*,
long const*, unsigned int, unsigned int, long const*, unsigned int, unsigned
int, signop_e, bool*) (wide-int.cc:1683)
==24993== 
==24993== Conditional jump or move depends on uninitialised value(s)
==24993==    at 0x107CA644: force_fit_type(tree_node*,
generic_wide_int<wide_int_ref_storage<false> > const&, int, bool) (tree.c:1223)
==24993==    by 0x103135A7: int_const_binop_1(tree_code, tree_node const*,
tree_node const*, int) (fold-const.c:1098)
==24993==    by 0x1079BC6F: vrp_int_const_binop(tree_code, tree_node*,
tree_node*) (tree-vrp.c:1934)
==24993==    by 0x1079C2EB:
extract_range_from_multiplicative_op_1(value_range_d*, tree_code,
value_range_d*, value_range_d*) (tree-vrp.c:2218)
==24993==    by 0x107A06CF: extract_range_from_binary_expr_1(value_range_d*,
tree_code, tree_node*, value_range_d*, value_range_d*) (tree-vrp.c:3117)
==24993==    by 0x1079FCC7: extract_range_from_binary_expr_1(value_range_d*,
tree_code, tree_node*, value_range_d*, value_range_d*) (tree-vrp.c:2397)
==24993==    by 0x107A2E57: extract_range_from_binary_expr(value_range_d*,
tree_code, tree_node*, tree_node*, tree_node*) (tree-vrp.c:3293)
==24993==    by 0x107A6373: extract_range_from_assignment(value_range_d*,
gimple_statement_base*) (tree-vrp.c:4003)
==24993==    by 0x107A8227: vrp_visit_assignment_or_call (tree-vrp.c:6920)
==24993==    by 0x107A8227: vrp_visit_stmt(gimple_statement_base*, edge_def**,
tree_node**) (tree-vrp.c:7731)
==24993==    by 0x106DEC97: simulate_stmt(gimple_statement_base*)
(tree-ssa-propagate.c:331)
==24993==    by 0x106E153F: simulate_block (tree-ssa-propagate.c:454)
==24993==    by 0x106E153F: ssa_propagate(ssa_prop_result
(*)(gimple_statement_base*, edge_def**, tree_node**), ssa_prop_result
(*)(gimple_statement_base*)) (tree-ssa-propagate.c:871)
==24993==    by 0x107B063F: execute_vrp (tree-vrp.c:9994)
==24993==    by 0x107B063F: (anonymous namespace)::pass_vrp::execute(function*)
(tree-vrp.c:10074)
==24993==  Uninitialised value was created by a stack allocation
==24993==    at 0x1080E418: wi::divmod_internal(long*, unsigned int*, long*,
long const*, unsigned int, unsigned int, long const*, unsigned int, unsigned
int, signop_e, bool*) (wide-int.cc:1683)
...

3)
==25128== Invalid read of size 4
==25128==    at 0x10A41D6C: get_last_value_validate(rtx_def**, rtx_insn*, int,
int) (combine.c:12629)
==25128==    by 0x10A41B97: get_last_value_validate(rtx_def**, rtx_insn*, int,
int) (combine.c:12688)
==25128==    by 0x10A42BF7: record_value_for_reg(rtx_def*, rtx_insn*, rtx_def*)
(combine.c:12300)
==25128==    by 0x1051F41F: note_stores(rtx_def const*, void (*)(rtx_def*,
rtx_def const*, void*), void*) (rtlanal.c:1606)
==25128==    by 0x10A4320F: record_dead_and_set_regs(rtx_insn*)
(combine.c:12432)
==25128==    by 0x10A5D3FB: combine_instructions (combine.c:1473)
==25128==    by 0x10A5D3FB: rest_of_handle_combine (combine.c:13902)
==25128==    by 0x10A5D3FB: (anonymous
namespace)::pass_combine::execute(function*) (combine.c:13945)
==25128==    by 0x104B5DC7: execute_one_pass(opt_pass*) (passes.c:2151)
==25128==    by 0x104B6463: execute_pass_list_1(opt_pass*) (passes.c:2203)
==25128==    by 0x104B647B: execute_pass_list_1(opt_pass*) (passes.c:2204)
==25128==    by 0x104B64FB: execute_pass_list(function*, opt_pass*)
(passes.c:2214)
==25128==    by 0x102236F7: cgraph_node::expand() (cgraphunit.c:1735)
==25128==    by 0x10224CC7: expand_all_functions (cgraphunit.c:1871)
==25128==    by 0x10224CC7: symbol_table::compile() (cgraphunit.c:2206)
==25128==  Address 0xd35cef8 is 0 bytes after a block of size 2,152 alloc'd
==25128==    at 0x402924C: malloc (vg_replace_malloc.c:296)
==25128==    by 0x10BA2E73: xmalloc (xmalloc.c:147)
==25128==    by 0x104F4823: regstat_init_n_sets_and_refs() (regstat.c:60)
==25128==    by 0x10A5C7A3: rest_of_handle_combine (combine.c:13899)
==25128==    by 0x10A5C7A3: (anonymous
namespace)::pass_combine::execute(function*) (combine.c:13945)
==25128==    by 0x104B5DC7: execute_one_pass(opt_pass*) (passes.c:2151)
==25128==    by 0x104B6463: execute_pass_list_1(opt_pass*) (passes.c:2203)
==25128==    by 0x104B647B: execute_pass_list_1(opt_pass*) (passes.c:2204)
==25128==    by 0x104B64FB: execute_pass_list(function*, opt_pass*)
(passes.c:2214)
==25128==    by 0x102236F7: cgraph_node::expand() (cgraphunit.c:1735)
==25128==    by 0x10224CC7: expand_all_functions (cgraphunit.c:1871)
==25128==    by 0x10224CC7: symbol_table::compile() (cgraphunit.c:2206)
==25128==    by 0x10226533: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2283)
==25128==    by 0x100F78A3: c_write_global_declarations() (c-decl.c:10623)
==25128==


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
@ 2014-10-10  7:35 ` rguenth at gcc dot gnu.org
  2014-10-10  7:37 ` trippels at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-10-10  7:35 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.0


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
  2014-10-10  7:35 ` [Bug other/63504] " rguenth at gcc dot gnu.org
@ 2014-10-10  7:37 ` trippels at gcc dot gnu.org
  2014-10-10  8:53 ` trippels at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-10  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Two more variations of issue 3)

==47649== Invalid read of size 4
==47649==    at 0x10B00978: reg_num_sign_bit_copies_for_combine(rtx_def const*,
machine_mode, rtx_def const*, machine_mode, unsigned int, unsigned int*)
(combine.c:9581)
==47649==    by 0x105E3CC3: num_sign_bit_copies1(rtx_def const*, machine_mode,
rtx_def const*, machine_mode, unsigned int) (rtlanal.c:4661)
==47649==    by 0x10B0493B: if_then_else_cond(rtx_def*, rtx_def**, rtx_def**)
(combine.c:8785)
==47649==    by 0x10B047D7: if_then_else_cond(rtx_def*, rtx_def**, rtx_def**)
(combine.c:8640)
==47649==    by 0x10B12D67: combine_simplify_rtx(rtx_def*, machine_mode, int,
int) (combine.c:5270)
==47649==    by 0x10B14C7B: subst(rtx_def*, rtx_def*, rtx_def*, int, int, int)
(combine.c:5207)
==47649==    by 0x10B14DF7: subst(rtx_def*, rtx_def*, rtx_def*, int, int, int)
(combine.c:5152)
==47649==    by 0x10B1694B: try_combine(rtx_insn*, rtx_insn*, rtx_insn*,
rtx_insn*, int*, rtx_insn*) (combine.c:3093)
==47649==    by 0x10B1BA47: combine_instructions (combine.c:1261)
==47649==    by 0x10B1BA47: rest_of_handle_combine (combine.c:13902)
==47649==    by 0x10B1BA47: (anonymous
namespace)::pass_combine::execute(function*) (combine.c:13945)
==47649==    by 0x10573E27: execute_one_pass(opt_pass*) (passes.c:2151)
==47649==    by 0x105744C3: execute_pass_list_1(opt_pass*) (passes.c:2203)
==47649==    by 0x105744DB: execute_pass_list_1(opt_pass*) (passes.c:2204)
==47649==  Address 0x69d38a8 is 0 bytes after a block of size 1,720 alloc'd
==47649==    at 0x402924C: malloc (vg_replace_malloc.c:296)
==47649==    by 0x10C6DE73: xmalloc (xmalloc.c:147)
==47649==    by 0x105B2883: regstat_init_n_sets_and_refs() (regstat.c:60)
==47649==    by 0x10B1AEE3: rest_of_handle_combine (combine.c:13899)
==47649==    by 0x10B1AEE3: (anonymous
namespace)::pass_combine::execute(function*) (combine.c:13945)
==47649==    by 0x10573E27: execute_one_pass(opt_pass*) (passes.c:2151)
==47649==    by 0x105744C3: execute_pass_list_1(opt_pass*) (passes.c:2203)
==47649==    by 0x105744DB: execute_pass_list_1(opt_pass*) (passes.c:2204)
==47649==    by 0x1057455B: execute_pass_list(function*, opt_pass*)
(passes.c:2214)
==47649==    by 0x102E2157: cgraph_node::expand() (cgraphunit.c:1735)
==47649==    by 0x102E3727: expand_all_functions (cgraphunit.c:1871)
==47649==    by 0x102E3727: symbol_table::compile() (cgraphunit.c:2206)
==47649==    by 0x102E4F93: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2283)
==47649==    by 0x104DF877: write_global_declarations() (langhooks.c:328)
==47649==
==47649== Invalid read of size 4
==47649==    at 0x10B00C68: reg_nonzero_bits_for_combine(rtx_def const*,
machine_mode, rtx_def const*, machine_mode, unsigned long, unsigned long*)
(combine.c:9504)
==47649==    by 0x105DAEF3: nonzero_bits1(rtx_def const*, machine_mode, rtx_def
const*, machine_mode, unsigned long) (rtlanal.c:4175)
==47649==    by 0x10B04C23: if_then_else_cond(rtx_def*, rtx_def**, rtx_def**)
(combine.c:8792)
==47649==    by 0x10B047D7: if_then_else_cond(rtx_def*, rtx_def**, rtx_def**)
(combine.c:8640)
==47649==    by 0x10B12D67: combine_simplify_rtx(rtx_def*, machine_mode, int,
int) (combine.c:5270)
==47649==    by 0x10B14C7B: subst(rtx_def*, rtx_def*, rtx_def*, int, int, int)
(combine.c:5207)
==47649==    by 0x10B14DF7: subst(rtx_def*, rtx_def*, rtx_def*, int, int, int)
(combine.c:5152)
==47649==    by 0x10B1694B: try_combine(rtx_insn*, rtx_insn*, rtx_insn*,
rtx_insn*, int*, rtx_insn*) (combine.c:3093)
==47649==    by 0x10B1BA47: combine_instructions (combine.c:1261)
==47649==    by 0x10B1BA47: rest_of_handle_combine (combine.c:13902)
==47649==    by 0x10B1BA47: (anonymous
namespace)::pass_combine::execute(function*) (combine.c:13945)
==47649==    by 0x10573E27: execute_one_pass(opt_pass*) (passes.c:2151)
==47649==    by 0x105744C3: execute_pass_list_1(opt_pass*) (passes.c:2203)
==47649==    by 0x105744DB: execute_pass_list_1(opt_pass*) (passes.c:2204)
==47649==  Address 0x69d38a8 is 0 bytes after a block of size 1,720 alloc'd
==47649==    at 0x402924C: malloc (vg_replace_malloc.c:296)
==47649==    by 0x10C6DE73: xmalloc (xmalloc.c:147)
==47649==    by 0x105B2883: regstat_init_n_sets_and_refs() (regstat.c:60)
==47649==    by 0x10B1AEE3: rest_of_handle_combine (combine.c:13899)
==47649==    by 0x10B1AEE3: (anonymous
namespace)::pass_combine::execute(function*) (combine.c:13945)
==47649==    by 0x10573E27: execute_one_pass(opt_pass*) (passes.c:2151)
==47649==    by 0x105744C3: execute_pass_list_1(opt_pass*) (passes.c:2203)
==47649==    by 0x105744DB: execute_pass_list_1(opt_pass*) (passes.c:2204)
==47649==    by 0x1057455B: execute_pass_list(function*, opt_pass*)
(passes.c:2214)
==47649==    by 0x102E2157: cgraph_node::expand() (cgraphunit.c:1735)
==47649==    by 0x102E3727: expand_all_functions (cgraphunit.c:1871)
==47649==    by 0x102E3727: symbol_table::compile() (cgraphunit.c:2206)
==47649==    by 0x102E4F93: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2283)
==47649==    by 0x104DF877: write_global_declarations() (langhooks.c:328)


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
  2014-10-10  7:35 ` [Bug other/63504] " rguenth at gcc dot gnu.org
  2014-10-10  7:37 ` trippels at gcc dot gnu.org
@ 2014-10-10  8:53 ` trippels at gcc dot gnu.org
  2014-10-10  9:03 ` trippels at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-10  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
To reproduce issue 3) run:

valgrind --track-origins=yes --trace-children=yes gfortran
gcc/testsuite/gfortran.dg/actual_array_result_1.f90 -fno-diagnostics-show-caret
-fdiagnostics-color=never -Os -c


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-10-10  8:53 ` trippels at gcc dot gnu.org
@ 2014-10-10  9:03 ` trippels at gcc dot gnu.org
  2014-10-11  8:04 ` trippels at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-10  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Markus Trippelsdorf from comment #2)
> To reproduce issue 3) run:
> 
> valgrind --track-origins=yes --trace-children=yes gfortran
> gcc/testsuite/gfortran.dg/actual_array_result_1.f90
> -fno-diagnostics-show-caret -fdiagnostics-color=never -Os -c

on ppc64.


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-10-11  8:04 ` trippels at gcc dot gnu.org
@ 2014-10-11  8:04 ` trippels at gcc dot gnu.org
  2014-10-12 14:16 ` trippels at gcc dot gnu.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-11  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Created attachment 33687
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33687&action=edit
testcase for issue 1)


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-10-10  9:03 ` trippels at gcc dot gnu.org
@ 2014-10-11  8:04 ` trippels at gcc dot gnu.org
  2014-10-11  8:04 ` trippels at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-11  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
On x86_64-unknown-linux-gnu everything seems fine, 
but issues 1) and 3) can be reproduced with a cross:

../gcc/configure --target=powerpc64-unknown-linux-gnu --disable-libsanitizer
--disable-bootstrap --disable-libstdcxx-pch --disable-libvtv --disable-libitm
--disable-libcilkrts --disable-libssp --disable-libgomp --disable-werror
--disable-multilib --enable-languages=c,c++,fortran

1)
valgrind --track-origins=yes --trace-children=yes ./gcc/xgcc -Bgcc -std=gnu11
-fcx-fortran-rules -g -O2 -S ~/maxloc0_4_i16.i

2)
Happened during testsuite run on a 64-core machine. So it is hard to tell
which command line triggered the problem. And running the testsuite single-
threaded would take weeks.

3)
valgrind --track-origins=yes --trace-children=yes ./gcc/gfortran -Bgcc
~/gcc/gcc/testsuite/gfortran.dg/actual_array_result_1.f90 -S
-fno-diagnostics-show-caret -fdiagnostics-color=never -Os -c


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-10-11  8:04 ` trippels at gcc dot gnu.org
@ 2014-10-12 14:16 ` trippels at gcc dot gnu.org
  2014-10-12 18:13 ` trippels at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-12 14:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Created attachment 33693
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33693&action=edit
testcase for issue 2)

2)
 % valgrind --track-origins=yes --trace-children=yes ./gcc/xgcc -Bgcc -c -S
-std=gnu11 -fcx-fortran-rules -O2 ../read.i


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-10-12 14:16 ` trippels at gcc dot gnu.org
@ 2014-10-12 18:13 ` trippels at gcc dot gnu.org
  2014-11-20 12:14 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-12 18:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
4)
markus@x4 gcc % valgrind -q --track-origins=yes --trace-children=yes g++
-Igcc/testsuite/g++.dg/cpp1y -Igcc/testsuite//g++.dg/cpp1y/testinc
gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C -std=gnu++1y -S
==16557== Conditional jump or move depends on uninitialised value(s)
==16557==    at 0x1215932: parse_has_include(cpp_reader*, include_type)
(expr.c:2143)
==16557==    by 0x1218E63: eval_token (expr.c:1056)
==16557==    by 0x1218E63: _cpp_parse_expr (expr.c:1224)
==16557==    by 0x1211BE3: do_if(cpp_reader*) (directives.c:1980)
==16557==    by 0x1213417: _cpp_handle_directive (directives.c:509)
==16557==    by 0x12202CC: _cpp_lex_token (lex.c:2172)
==16557==    by 0x122513F: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2408)
==16557==    by 0x7CB2BC: c_lex_with_flags(tree_node**, unsigned int*, unsigned
char*, int) (c-lex.c:303)
==16557==    by 0x673A0F: cp_lexer_get_preprocessor_token(cp_lexer*, cp_token*)
(parser.c:763)
==16557==    by 0x6AA905: cp_parser_initial_pragma (parser.c:31771)
==16557==    by 0x6AA905: cp_lexer_new_main (parser.c:633)
==16557==    by 0x6AA905: cp_parser_new (parser.c:3434)
==16557==    by 0x6AA905: c_parse_file() (parser.c:32090)
==16557==    by 0x7D3482: c_common_parse_file() (c-opts.c:1043)
==16557==    by 0xBD4631: compile_file() (toplev.c:551)
==16557==    by 0xBD6A01: do_compile (toplev.c:1946)
==16557==    by 0xBD6A01: toplev_main(int, char**) (toplev.c:2022)
==16557==  Uninitialised value was created by a heap allocation
==16557==    at 0x4028AEF: malloc (vg_replace_malloc.c:296)
==16557==    by 0x124B867: xmalloc (xmalloc.c:147)
==16557==    by 0x121D6CA: _cpp_init_tokenrun (lex.c:2006)
==16557==    by 0x121BD1A: cpp_create_reader(c_lang, ht*, line_maps*)
(init.c:242)
==16557==    by 0x7D115C: c_common_init_options(unsigned int,
cl_decoded_option*) (c-opts.c:237)
==16557==    by 0xBD6131: toplev_main(int, char**) (toplev.c:2000)
==16557==    by 0x4ED6FCF: (below main) (in /lib64/libc-2.19.90.so)
==16557== 
==16557== Conditional jump or move depends on uninitialised value(s)
==16557==    at 0x1218424: _cpp_parse_expr (expr.c:1325)
==16557==    by 0x1211BE3: do_if(cpp_reader*) (directives.c:1980)
==16557==    by 0x1213417: _cpp_handle_directive (directives.c:509)
==16557==    by 0x12202CC: _cpp_lex_token (lex.c:2172)
==16557==    by 0x122513F: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2408)
==16557==    by 0x7CB2BC: c_lex_with_flags(tree_node**, unsigned int*, unsigned
char*, int) (c-lex.c:303)
==16557==    by 0x673A0F: cp_lexer_get_preprocessor_token(cp_lexer*, cp_token*)
(parser.c:763)
==16557==    by 0x6AA905: cp_parser_initial_pragma (parser.c:31771)
==16557==    by 0x6AA905: cp_lexer_new_main (parser.c:633)
==16557==    by 0x6AA905: cp_parser_new (parser.c:3434)
==16557==    by 0x6AA905: c_parse_file() (parser.c:32090)
==16557==    by 0x7D3482: c_common_parse_file() (c-opts.c:1043)
==16557==    by 0xBD4631: compile_file() (toplev.c:551)
==16557==    by 0xBD6A01: do_compile (toplev.c:1946)
==16557==    by 0xBD6A01: toplev_main(int, char**) (toplev.c:2022)
==16557==    by 0x4ED6FCF: (below main) (in /lib64/libc-2.19.90.so)
==16557==  Uninitialised value was created by a heap allocation
==16557==    at 0x4028AEF: malloc (vg_replace_malloc.c:296)
==16557==    by 0x124B867: xmalloc (xmalloc.c:147)
==16557==    by 0x121D6CA: _cpp_init_tokenrun (lex.c:2006)
==16557==    by 0x121BD1A: cpp_create_reader(c_lang, ht*, line_maps*)
(init.c:242)
==16557==    by 0x7D115C: c_common_init_options(unsigned int,
cl_decoded_option*) (c-opts.c:237)
==16557==    by 0xBD6131: toplev_main(int, char**) (toplev.c:2000)
==16557==    by 0x4ED6FCF: (below main) (in /lib64/libc-2.19.90.so)
==16557==


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2014-10-12 18:13 ` trippels at gcc dot gnu.org
@ 2014-11-20 12:14 ` rguenth at gcc dot gnu.org
  2015-01-26 17:57 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-20 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
note that individual bugs would have been easier to assign / keep track of


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2014-11-20 12:14 ` rguenth at gcc dot gnu.org
@ 2015-01-26 17:57 ` jakub at gcc dot gnu.org
  2015-01-26 18:35 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-26 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For 2) a short testcase is:
__uint128_t
foo (void)
{
  __uint128_t a = -1;
  __uint128_t b = a - 0x80000000ULL;
  return a / b;
}
(even on x86_64 native).


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2015-01-26 17:57 ` jakub at gcc dot gnu.org
@ 2015-01-26 18:35 ` jakub at gcc dot gnu.org
  2015-01-27 19:24 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-26 18:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
2) == #c11 tracked now in PR64807.


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2015-01-26 18:35 ` jakub at gcc dot gnu.org
@ 2015-01-27 19:24 ` jakub at gcc dot gnu.org
  2015-01-27 20:17 ` ccoutant at google dot com
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-27 19:24 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ccoutant at gcc dot gnu.org,
                   |                            |mrs at gcc dot gnu.org

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The 1) issue is that e.g.
  mem_loc_result->dw_loc_oprnd2.v.val_wide = ggc_cleared_alloc<wide_int> ();
  *mem_loc_result->dw_loc_oprnd2.v.val_wide = std::make_pair (rtl, mode);
doesn't in any way make sure the unused bits in the structure are all zeros,
they can contain random stack garbage.  While the object is allocated cleared,
then it is overwritten with bits from wide_int constructed.

So I think we want something like:

--- gcc/dwarf2out.c.jj    2015-01-27 19:03:30.000000000 +0100
+++ gcc/dwarf2out.c    2015-01-27 20:10:27.683868052 +0100
@@ -3886,7 +3886,7 @@ add_AT_wide (dw_die_ref die, enum dwarf_

   attr.dw_attr = attr_kind;
   attr.dw_attr_val.val_class = dw_val_class_wide_int;
-  attr.dw_attr_val.v.val_wide = ggc_cleared_alloc<wide_int> ();
+  attr.dw_attr_val.v.val_wide = ggc_alloc<wide_int> ();
   *attr.dw_attr_val.v.val_wide = w;
   add_dwarf_attr (die, &attr);
 }
@@ -5728,7 +5728,14 @@ attr_checksum (dw_attr_ref at, struct md
       CHECKSUM (at->dw_attr_val.v.val_double);
       break;
     case dw_val_class_wide_int:
-      CHECKSUM (*at->dw_attr_val.v.val_wide);
+      {
+        unsigned int len = at->dw_attr_val.v.val_wide->get_len ();
+        unsigned int precision = at->dw_attr_val.v.val_wide->get_precision ();
+        CHECKSUM (len);
+        CHECKSUM (precision);
+        CHECKSUM_BLOCK (at->dw_attr_val.v.val_wide->get_val (),
+            HOST_BITS_PER_WIDE_INT * len / HOST_BITS_PER_CHAR);
+      }
       break;
     case dw_val_class_vec:
       CHECKSUM_BLOCK (at->dw_attr_val.v.val_vec.array,
@@ -13162,7 +13169,7 @@ mem_loc_descriptor (rtx rtl, machine_mod
       mem_loc_result->dw_loc_oprnd1.v.val_die_ref.external = 0;
       mem_loc_result->dw_loc_oprnd2.val_class
         = dw_val_class_wide_int;
-      mem_loc_result->dw_loc_oprnd2.v.val_wide = ggc_cleared_alloc<wide_int>
();
+      mem_loc_result->dw_loc_oprnd2.v.val_wide = ggc_alloc<wide_int> ();
       *mem_loc_result->dw_loc_oprnd2.v.val_wide = std::make_pair (rtl, mode);
     }
       break;
@@ -13665,7 +13672,7 @@ loc_descriptor (rtx rtl, machine_mode mo
       loc_result = new_loc_descr (DW_OP_implicit_value,
                       GET_MODE_SIZE (mode), 0);
       loc_result->dw_loc_oprnd2.val_class = dw_val_class_wide_int;
-      loc_result->dw_loc_oprnd2.v.val_wide = ggc_cleared_alloc<wide_int> ();
+      loc_result->dw_loc_oprnd2.v.val_wide = ggc_alloc<wide_int> ();
       *loc_result->dw_loc_oprnd2.v.val_wide = std::make_pair (rtl, mode);
     }
       break;
@@ -24037,7 +24044,14 @@ hash_loc_operands (dw_loc_descr_ref loc,
       hstate.add_object (val2->v.val_double.high);
       break;
     case dw_val_class_wide_int:
-      hstate.add_object (*val2->v.val_wide);
+      {
+        unsigned int precision = val2->v.val_wide->get_precision ();
+        unsigned int len = val2->v.val_wide->get_len ();
+        hstate.add_object (precision);
+        hstate.add_object (len);
+        hstate.add (val2->v.val_wide->get_val (),
+            HOST_BITS_PER_WIDE_INT * len / HOST_BITS_PER_CHAR);
+      }
       break;
     case dw_val_class_addr:    
       inchash::add_rtx (val2->v.val_addr, hstate);
@@ -24128,7 +24142,14 @@ hash_loc_operands (dw_loc_descr_ref loc,
         hstate.add_object (val2->v.val_double.high);
         break;
       case dw_val_class_wide_int:
-        hstate.add_object (*val2->v.val_wide);
+        {
+          unsigned int precision = val2->v.val_wide->get_precision ();
+          unsigned int len = val2->v.val_wide->get_len ();
+          hstate.add_object (precision);
+          hstate.add_object (len);
+          hstate.add (val2->v.val_wide->get_val (),
+              HOST_BITS_PER_WIDE_INT * len / HOST_BITS_PER_CHAR);
+        }
         break;
       default:
         gcc_unreachable ();

or perhaps not hash precision and len separately, but instead call get_full_len
to get that length and use that for the get_val () checksumming?

But then there is (question mainly on Cary) the .debug_types checksumming:

    case dw_val_class_const_double:
      CHECKSUM_ULEB128 (DW_FORM_block);
      CHECKSUM_ULEB128 (sizeof (at->dw_attr_val.v.val_double));
      CHECKSUM (at->dw_attr_val.v.val_double);
      break;

    case dw_val_class_wide_int:
      CHECKSUM_ULEB128 (DW_FORM_block);
      CHECKSUM_ULEB128 (sizeof (*at->dw_attr_val.v.val_wide));
      CHECKSUM (*at->dw_attr_val.v.val_wide);
      break;

and that one ought to be governed by the DWARF standard, so I wonder how it can
get away without converting for endianity etc.


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2015-01-27 19:24 ` jakub at gcc dot gnu.org
@ 2015-01-27 20:17 ` ccoutant at google dot com
  2015-01-28 20:31 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ccoutant at google dot com @ 2015-01-27 20:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from ccoutant at google dot com ---
> But then there is (question mainly on Cary) the .debug_types checksumming:
>
>     case dw_val_class_const_double:
>       CHECKSUM_ULEB128 (DW_FORM_block);
>       CHECKSUM_ULEB128 (sizeof (at->dw_attr_val.v.val_double));
>       CHECKSUM (at->dw_attr_val.v.val_double);
>       break;
>
>     case dw_val_class_wide_int:
>       CHECKSUM_ULEB128 (DW_FORM_block);
>       CHECKSUM_ULEB128 (sizeof (*at->dw_attr_val.v.val_wide));
>       CHECKSUM (*at->dw_attr_val.v.val_wide);
>       break;
>
> and that one ought to be governed by the DWARF standard, so I wonder how it can
> get away without converting for endianity etc.

There shouldn't be any location lists in .debug_types, so I don't
think the DWARF standard really matters for this case, and it would be
reasonable to use the same hashing you use for other purposes. Some
may slip through, unfortunately, so I covered this case just for
completeness.

-cary


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2015-01-27 20:17 ` ccoutant at google dot com
@ 2015-01-28 20:31 ` jakub at gcc dot gnu.org
  2015-02-03  9:40 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-28 20:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Jan 28 20:30:30 2015
New Revision: 220216

URL: https://gcc.gnu.org/viewcvs?rev=220216&root=gcc&view=rev
Log:
    PR other/63504
    * dwarf2out.c (add_AT_wide, mem_loc_descriptor, loc_descriptor):
    Use ggc_alloc<wide_int> instead of ggc_cleared_alloc<wide_int>.
    (attr_checksum, attr_checksum_ordered, hash_loc_operands): Checksum
    only get_full_len HOST_WIDE_INTs from get_val () array rather than
    all bits in *val_wide.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2015-02-03  9:40 ` jakub at gcc dot gnu.org
@ 2015-02-03  9:40 ` jakub at gcc dot gnu.org
  2015-03-09 20:49 ` trippels at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-03  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Feb  3 09:39:19 2015
New Revision: 220368

URL: https://gcc.gnu.org/viewcvs?rev=220368&root=gcc&view=rev
Log:
    PR other/63504
    * combine.c (reg_n_sets_max): New variable.
    (can_change_dest_mode, reg_nonzero_bits_for_combine,
    reg_num_sign_bit_copies_for_combine, get_last_value_validate,
    get_last_value): Use REG_N_SETS only on pseudos < reg_n_sets_max.
    (try_combine): Use INC_REG_N_SETS only on pseudos < reg_n_sets_max.
    (rest_of_handle_combine): Initialize reg_n_sets_max.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/combine.c


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2015-01-28 20:31 ` jakub at gcc dot gnu.org
@ 2015-02-03  9:40 ` jakub at gcc dot gnu.org
  2015-02-03  9:40 ` jakub at gcc dot gnu.org
  2015-03-09 20:49 ` trippels at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-03  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I believe all the reported issues are fixed now.  If any further issues come
up, they should be filed separately, using a single PR to track too many
unrelated things is bad.


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

* [Bug other/63504] [5 Regression] Issues found by --enable-checking=valgrind
  2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2015-02-03  9:40 ` jakub at gcc dot gnu.org
@ 2015-03-09 20:49 ` trippels at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-09 20:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63504
Bug 63504 depends on bug 63988, which changed state.

Bug 63988 Summary: heap-buffer-overflow in combine.c on ppc64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63988

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED


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

end of thread, other threads:[~2015-03-09 20:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-10  6:34 [Bug other/63504] New: [5 Regression] Issues found by --enable-checking=valgrind trippels at gcc dot gnu.org
2014-10-10  7:35 ` [Bug other/63504] " rguenth at gcc dot gnu.org
2014-10-10  7:37 ` trippels at gcc dot gnu.org
2014-10-10  8:53 ` trippels at gcc dot gnu.org
2014-10-10  9:03 ` trippels at gcc dot gnu.org
2014-10-11  8:04 ` trippels at gcc dot gnu.org
2014-10-11  8:04 ` trippels at gcc dot gnu.org
2014-10-12 14:16 ` trippels at gcc dot gnu.org
2014-10-12 18:13 ` trippels at gcc dot gnu.org
2014-11-20 12:14 ` rguenth at gcc dot gnu.org
2015-01-26 17:57 ` jakub at gcc dot gnu.org
2015-01-26 18:35 ` jakub at gcc dot gnu.org
2015-01-27 19:24 ` jakub at gcc dot gnu.org
2015-01-27 20:17 ` ccoutant at google dot com
2015-01-28 20:31 ` jakub at gcc dot gnu.org
2015-02-03  9:40 ` jakub at gcc dot gnu.org
2015-02-03  9:40 ` jakub at gcc dot gnu.org
2015-03-09 20:49 ` trippels at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).