Hello Jan,
---------- Původní e-mail ---------- Od: Jan Hubicka <hubi...@kam.mff.cuni.cz> Komu: Zdenek Sojka <zso...@seznam.cz> Datum: 25. 11. 2021 12:54:00 Předmět: Re: distinguishing gcc compilation valgrind false positives > > I can confirm that zero-initializing node_is_self_scc prevents the > uninitialised use warnings in incorporate_penalties (ipa-cp.c:3282) > Great, I will commit the patch. But I also wonder if there are any > remaining unitialized warnings in ipa code? (I am sorry for the broken formatting, Seznam web email client is very unfriedly to non-HTML emails) Apart from: ==22707== Invalid read of size 4 ==22707== at 0x197C260: put (hash-map.h:179) which is already reported as https://gcc.gnu.org/PR101292 , the other warnings are still there: ==22707== Invalid read of size 8 ==22707== at 0x13FFBCE: hash_map<tree_node*, tree_node*, simple_hashmap_traits<default_hash_traits<tree_node*>, tree_node*> >::put(tree_node* const&, tree_node* const&) [clone .isra.0] (hash-map.h:176) ==22707== by 0x1400E76: ipa_param_body_adjustments::prepare_debug_expressions(tree_node*) (ipa-param-manipulation.c:1250) ==22707== by 0x140069B: ipa_param_body_adjustments::prepare_debug_expressions(tree_node*) (ipa-param-manipulation.c:1230) ==22707== by 0x1401997: ipa_param_body_adjustments::common_initialization(tree_node*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa-param-manipulation.c:1428) ==22707== by 0x16C7AD4: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==22707== by 0x117328D: cgraph_node::materialize_clone() (cgraphclones.c:1142) ==22707== by 0x1161A15: cgraph_node::get_untransformed_body() (cgraph.c:3965) ==22707== by 0x13BE3AB: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13C02AB: inline_transform(cgraph_node*) (ipa-inline-transform.c:777) ==22707== Address 0x81c5f98 is 40 bytes inside a block of size 208 free'd ==22707== at 0x484240F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==22707== by 0x13FFC08: find_slot_with_hash (hash-table.h:967) ==22707== by 0x13FFC08: hash_map<tree_node*, tree_node*, simple_hashmap_traits<default_hash_traits<tree_node*>, tree_node*> >::put(tree_node* const&, tree_node* const&) [clone .isra.0] (hash-map.h:170) ==22707== by 0x1400E76: ipa_param_body_adjustments::prepare_debug_expressions(tree_node*) (ipa-param-manipulation.c:1250) ==22707== by 0x140069B: ipa_param_body_adjustments::prepare_debug_expressions(tree_node*) (ipa-param-manipulation.c:1230) ==22707== by 0x1401997: ipa_param_body_adjustments::common_initialization(tree_node*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa-param-manipulation.c:1428) ==22707== by 0x16C7AD4: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==22707== by 0x117328D: cgraph_node::materialize_clone() (cgraphclones.c:1142) ==22707== by 0x1161A15: cgraph_node::get_untransformed_body() (cgraph.c:3965) ==22707== by 0x13BE3AB: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== Block was alloc'd at ==22707== at 0x4844C0F: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==22707== by 0x2803A14: xcalloc (xmalloc.c:164) ==22707== by 0x100DE26: data_alloc (hash-table.h:275) ==22707== by 0x100DE26: alloc_entries (hash-table.h:711) ==22707== by 0x100DE26: hash_table<hash_map<tree_node*, tree_node*, simple_hashmap_traits<default_hash_traits<tree_node*>, tree_node*> >::hash_entry, false, xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_origin) (hash-table.h:628) ==22707== by 0x140271A: hash_map (hash-map.h:142) ==22707== by 0x140271A: ipa_param_body_adjustments::ipa_param_body_adjustments(ipa_param_adjustments*, tree_node*, tree_node*, copy_body_data*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa-param-manipulation.c:1483) ==22707== by 0x16C7AD4: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==22707== by 0x117328D: cgraph_node::materialize_clone() (cgraphclones.c:1142) ==22707== by 0x1161A15: cgraph_node::get_untransformed_body() (cgraph.c:3965) ==22707== by 0x13BE3AB: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13C02AB: inline_transform(cgraph_node*) (ipa-inline-transform.c:777) ==22707== ==22707== Invalid read of size 8 ==22707== at 0x1400E77: ipa_param_body_adjustments::prepare_debug_expressions(tree_node*) (ipa-param-manipulation.c:1251) ==22707== by 0x140069B: ipa_param_body_adjustments::prepare_debug_expressions(tree_node*) (ipa-param-manipulation.c:1230) ==22707== by 0x1401997: ipa_param_body_adjustments::common_initialization(tree_node*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa-param-manipulation.c:1428) ==22707== by 0x16C7AD4: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==22707== by 0x117328D: cgraph_node::materialize_clone() (cgraphclones.c:1142) ==22707== by 0x1161A15: cgraph_node::get_untransformed_body() (cgraph.c:3965) ==22707== by 0x13BE3AB: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13C02AB: inline_transform(cgraph_node*) (ipa-inline-transform.c:777) ==22707== by 0x1539955: execute_one_ipa_transform_pass (passes.c:2290) ==22707== by 0x1539955: execute_all_ipa_transforms(bool) (passes.c:2337) ==22707== Address 0x81c5f98 is 40 bytes inside a block of size 208 free'd ==22707== at 0x484240F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==22707== by 0x13FFC08: find_slot_with_hash (hash-table.h:967) ==22707== by 0x13FFC08: hash_map<tree_node*, tree_node*, simple_hashmap_traits<default_hash_traits<tree_node*>, tree_node*> >::put(tree_node* const&, tree_node* const&) [clone .isra.0] (hash-map.h:170) ==22707== by 0x1400E76: ipa_param_body_adjustments::prepare_debug_expressions(tree_node*) (ipa-param-manipulation.c:1250) ==22707== by 0x140069B: ipa_param_body_adjustments::prepare_debug_expressions(tree_node*) (ipa-param-manipulation.c:1230) ==22707== by 0x1401997: ipa_param_body_adjustments::common_initialization(tree_node*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa-param-manipulation.c:1428) ==22707== by 0x16C7AD4: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==22707== by 0x117328D: cgraph_node::materialize_clone() (cgraphclones.c:1142) ==22707== by 0x1161A15: cgraph_node::get_untransformed_body() (cgraph.c:3965) ==22707== by 0x13BE3AB: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== Block was alloc'd at ==22707== at 0x4844C0F: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==22707== by 0x2803A14: xcalloc (xmalloc.c:164) ==22707== by 0x100DE26: data_alloc (hash-table.h:275) ==22707== by 0x100DE26: alloc_entries (hash-table.h:711) ==22707== by 0x100DE26: hash_table<hash_map<tree_node*, tree_node*, simple_hashmap_traits<default_hash_traits<tree_node*>, tree_node*> >::hash_entry, false, xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_origin) (hash-table.h:628) ==22707== by 0x140271A: hash_map (hash-map.h:142) ==22707== by 0x140271A: ipa_param_body_adjustments::ipa_param_body_adjustments(ipa_param_adjustments*, tree_node*, tree_node*, copy_body_data*, tree_node**, vec<ipa_replace_map*, va_gc, vl_embed>*) (ipa-param-manipulation.c:1483) ==22707== by 0x16C7AD4: tree_function_versioning(tree_node*, tree_node*, vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool, bitmap_head*, basic_block_def*) (tree-inline.c:6303) ==22707== by 0x117328D: cgraph_node::materialize_clone() (cgraphclones.c:1142) ==22707== by 0x1161A15: cgraph_node::get_untransformed_body() (cgraph.c:3965) ==22707== by 0x13BE3AB: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:720) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13BE3DC: maybe_materialize_called_clones(cgraph_node*) [clone .isra.0] (ipa-inline-transform.c:715) ==22707== by 0x13C02AB: inline_transform(cgraph_node*) (ipa-inline-transform.c:777) ==22707== Thanks, Zdenek