public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for
@ 2015-09-20 15:12 dcb314 at hotmail dot com
  2015-09-21  7:41 ` [Bug middle-end/67649] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: dcb314 at hotmail dot com @ 2015-09-20 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67649
           Summary: trunk build with valgrind fail in get_def_blocks_for
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

I just tried to build gcc trunk of today (20150920) on x86_64
and got this:

/home/dcb/gcc/working/./gcc/xgcc -B/home/dcb/gcc/working/./gcc/
-B/home/dcb/gcc/results/x86_64-pc-linux-gnu/bin/
-B/home/dcb/gcc/results/x86_64-pc-linux-gnu/lib/ -isystem
/home/dcb/gcc/results/x86_64-pc-linux-gnu/include -isystem
/home/dcb/gcc/results/x86_64-pc-linux-gnu/sys-include    -g -O3 -march=native
-O2  -g -O3 -march=native -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
-isystem ./include   -fpic -mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2
-fbuilding-libgcc -fno-stack-protector   -fpic -mlong-double-80
-DUSE_ELF_SYMVER -I. -I. -I../.././gcc -I../../../src/trunk/libgcc
-I../../../src/trunk/libgcc/. -I../../../src/trunk/libgcc/../gcc
-I../../../src/trunk/libgcc/../include
-I../../../src/trunk/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT
-DHAVE_CC_TLS  -DUSE_TLS -o _ashldi3.o -MT _ashldi3.o -MD -MP -MF _ashldi3.dep
-DL_ashldi3 -c ../../../src/trunk/libgcc/libgcc2.c -fvisibility=hidden
-DHIDE_EXPORTS
==9820== Invalid write of size 8
==9820==    at 0x670401: bitmap_initialize_stat (bitmap.h:332)
==9820==    by 0x670401: bitmap_obstack_alloc_stat(bitmap_obstack*)
(bitmap.c:286)
==9820==    by 0xAEB9B3: get_def_blocks_for (tree-into-ssa.c:489)
==9820==    by 0xAEB9B3: set_livein_block (tree-into-ssa.c:543)


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
@ 2015-09-21  7:41 ` rguenth at gcc dot gnu.org
  2015-09-21  8:44 ` dcb314 at hotmail dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-21  7:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
You are using -O3 -march=native it seems.  Note that the error doesn't make
much sense to me.


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
  2015-09-21  7:41 ` [Bug middle-end/67649] " rguenth at gcc dot gnu.org
@ 2015-09-21  8:44 ` dcb314 at hotmail dot com
  2015-09-21  9:28 ` trippels at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dcb314 at hotmail dot com @ 2015-09-21  8:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Richard Biener from comment #1)
> You are using -O3 -march=native it seems.  

I checked, and the problem also occurs in the simpler case
when -O3 -march=native is replaced by -O2.

> Note that the error doesn't make much sense to me.

bitmap.h:332 is

  head->first = head->current = NULL;

bitmap.c:286 is

  bitmap_initialize_stat (map, bit_obstack PASS_MEM_STAT);

tree-into-ssa.c:489 is

     db_p->def_blocks = BITMAP_ALLOC (&update_ssa_obstack);


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
  2015-09-21  7:41 ` [Bug middle-end/67649] " rguenth at gcc dot gnu.org
  2015-09-21  8:44 ` dcb314 at hotmail dot com
@ 2015-09-21  9:28 ` trippels at gcc dot gnu.org
  2015-09-21  9:33 ` trippels at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-21  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-09-21
                 CC|                            |trippels at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Also happens on ppc64le:

...
==72250== Invalid write of size 8
==72250==    at 0x10200988: bitmap_initialize_stat (bitmap.h:333)
==72250==    by 0x10200988: bitmap_obstack_alloc_stat(bitmap_obstack*)
(bitmap.c:286)
==72250==    by 0x102A4E03: df_analyze() (df-core.c:1263)
==72250==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==72250==    by 0x1027F6CB: cgraph_node::expand() (cgraphunit.c:1983)
==72250==    by 0x10281097: expand_all_functions (cgraphunit.c:2119)
==72250==    by 0x10281097: symbol_table::compile() (cgraphunit.c:2472)
==72250==    by 0x10282D0B: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2562)
==72250==    by 0x1063E78F: compile_file() (toplev.c:508)
==72250==    by 0x1011535F: do_compile (toplev.c:1973)
==72250==    by 0x1011535F: toplev::main(int, char**) (toplev.c:2080)
==72250==    by 0x10117337: main (main.c:39)
==72250==  Address 0xe3bdb60 is 256 bytes inside a block of size 65,536 alloc'd
==72250==    at 0x4093D9C: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==72250==    by 0x10D2562B: xmalloc (xmalloc.c:147)
==72250==    by 0x10CC4FC3: mempool_obstack_chunk_alloc(unsigned long)
(memory-block.cc:51)
==72250==    by 0x466D2A3: _obstack_begin (in /usr/lib64/libc-2.20.so)
==72250==    by 0x107FF9BF: init_alias_vars() (tree-ssa-structalias.c:6658)
==72250==    by 0x10800117: compute_points_to_sets
(tree-ssa-structalias.c:6782)
==72250==    by 0x10800117: compute_may_aliases() (tree-ssa-structalias.c:7139)
==72250==    by 0x1055931B: execute_function_todo(function*, void*)
(passes.c:1932)
==72250==    by 0x1055A363: do_per_function(void (*)(function*, void*), void*)
(passes.c:1652)
==72250==    by 0x1055A59F: execute_todo(unsigned int) (passes.c:2018)
==72250==    by 0x1055D4F7: execute_one_pass(opt_pass*) (passes.c:2345)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==
==72250== Invalid write of size 8
==72250==    at 0x10200998: bitmap_initialize_stat (bitmap.h:332)
==72250==    by 0x10200998: bitmap_obstack_alloc_stat(bitmap_obstack*)
(bitmap.c:286)
==72250==    by 0x102A4E03: df_analyze() (df-core.c:1263)
==72250==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==72250==    by 0x1027F6CB: cgraph_node::expand() (cgraphunit.c:1983)
==72250==    by 0x10281097: expand_all_functions (cgraphunit.c:2119)
==72250==    by 0x10281097: symbol_table::compile() (cgraphunit.c:2472)
==72250==    by 0x10282D0B: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2562)
==72250==    by 0x1063E78F: compile_file() (toplev.c:508)
==72250==    by 0x1011535F: do_compile (toplev.c:1973)
==72250==    by 0x1011535F: toplev::main(int, char**) (toplev.c:2080)
==72250==    by 0x10117337: main (main.c:39)
==72250==  Address 0xe3bdb58 is 248 bytes inside a block of size 65,536 alloc'd
==72250==    at 0x4093D9C: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==72250==    by 0x10D2562B: xmalloc (xmalloc.c:147)
==72250==    by 0x10CC4FC3: mempool_obstack_chunk_alloc(unsigned long)
(memory-block.cc:51)
==72250==    by 0x466D2A3: _obstack_begin (in /usr/lib64/libc-2.20.so)
==72250==    by 0x107FF9BF: init_alias_vars() (tree-ssa-structalias.c:6658)
==72250==    by 0x10800117: compute_points_to_sets
(tree-ssa-structalias.c:6782)
==72250==    by 0x10800117: compute_may_aliases() (tree-ssa-structalias.c:7139)
==72250==    by 0x1055931B: execute_function_todo(function*, void*)
(passes.c:1932)
==72250==    by 0x1055A363: do_per_function(void (*)(function*, void*), void*)
(passes.c:1652)
==72250==    by 0x1055A59F: execute_todo(unsigned int) (passes.c:2018)
==72250==    by 0x1055D4F7: execute_one_pass(opt_pass*) (passes.c:2345)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==
==72250== Invalid read of size 8
==72250==    at 0x10203BE0: bitmap_find_bit (bitmap.c:488)
==72250==    by 0x10203BE0: bitmap_set_bit(bitmap_head*, int) (bitmap.c:576)
==72250==    by 0x102A4EF3: df_analyze() (df-core.c:1274)
==72250==    by 0x1094C43B: rs6000_analyze_swaps(function*) (rs6000.c:36112)
==72250==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==72250==    by 0x1027F6CB: cgraph_node::expand() (cgraphunit.c:1983)
==72250==    by 0x10281097: expand_all_functions (cgraphunit.c:2119)
==72250==    by 0x10281097: symbol_table::compile() (cgraphunit.c:2472)
==72250==    by 0x10282D0B: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2562)
==72250==    by 0x1063E78F: compile_file() (toplev.c:508)
==72250==    by 0x1011535F: do_compile (toplev.c:1973)
==72250==    by 0x1011535F: toplev::main(int, char**) (toplev.c:2080)
==72250==  Address 0xe3bdb60 is 256 bytes inside a block of size 65,536 alloc'd
==72250==    at 0x4093D9C: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==72250==    by 0x10D2562B: xmalloc (xmalloc.c:147)
==72250==    by 0x10CC4FC3: mempool_obstack_chunk_alloc(unsigned long)
(memory-block.cc:51)
==72250==    by 0x466D2A3: _obstack_begin (in /usr/lib64/libc-2.20.so)
==72250==    by 0x107FF9BF: init_alias_vars() (tree-ssa-structalias.c:6658)
==72250==    by 0x10800117: compute_points_to_sets
(tree-ssa-structalias.c:6782)
==72250==    by 0x10800117: compute_may_aliases() (tree-ssa-structalias.c:7139)
==72250==    by 0x1055931B: execute_function_todo(function*, void*)
(passes.c:1932)
==72250==    by 0x1055A363: do_per_function(void (*)(function*, void*), void*)
(passes.c:1652)
==72250==    by 0x1055A59F: execute_todo(unsigned int) (passes.c:2018)
==72250==    by 0x1055D4F7: execute_one_pass(opt_pass*) (passes.c:2345)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==
==72250== Invalid read of size 8
==72250==    at 0x10203BF8: bitmap_element_allocate (bitmap.c:131)
==72250==    by 0x10203BF8: bitmap_set_bit(bitmap_head*, int) (bitmap.c:583)
==72250==    by 0x102A4EF3: df_analyze() (df-core.c:1274)
==72250==    by 0x1094C43B: rs6000_analyze_swaps(function*) (rs6000.c:36112)
==72250==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==72250==    by 0x1027F6CB: cgraph_node::expand() (cgraphunit.c:1983)
==72250==    by 0x10281097: expand_all_functions (cgraphunit.c:2119)
==72250==    by 0x10281097: symbol_table::compile() (cgraphunit.c:2472)
==72250==    by 0x10282D0B: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2562)
==72250==    by 0x1063E78F: compile_file() (toplev.c:508)
==72250==    by 0x1011535F: do_compile (toplev.c:1973)
==72250==    by 0x1011535F: toplev::main(int, char**) (toplev.c:2080)
==72250==  Address 0xe3bdb00 is 160 bytes inside a block of size 65,536 alloc'd
==72250==    at 0x4093D9C: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==72250==    by 0x10D2562B: xmalloc (xmalloc.c:147)
==72250==    by 0x10CC4FC3: mempool_obstack_chunk_alloc(unsigned long)
(memory-block.cc:51)
==72250==    by 0x466D2A3: _obstack_begin (in /usr/lib64/libc-2.20.so)
==72250==    by 0x107FF9BF: init_alias_vars() (tree-ssa-structalias.c:6658)
==72250==    by 0x10800117: compute_points_to_sets
(tree-ssa-structalias.c:6782)
==72250==    by 0x10800117: compute_may_aliases() (tree-ssa-structalias.c:7139)
==72250==    by 0x1055931B: execute_function_todo(function*, void*)
(passes.c:1932)
==72250==    by 0x1055A363: do_per_function(void (*)(function*, void*), void*)
(passes.c:1652)
==72250==    by 0x1055A59F: execute_todo(unsigned int) (passes.c:2018)
==72250==    by 0x1055D4F7: execute_one_pass(opt_pass*) (passes.c:2345)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==
==72250== Invalid read of size 8
==72250==    at 0x10203E24: bitmap_element_allocate (bitmap.c:138)
==72250==    by 0x10203E24: bitmap_set_bit(bitmap_head*, int) (bitmap.c:583)
==72250==    by 0x102A4EF3: df_analyze() (df-core.c:1274)
==72250==    by 0x1094C43B: rs6000_analyze_swaps(function*) (rs6000.c:36112)
==72250==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==72250==    by 0x1027F6CB: cgraph_node::expand() (cgraphunit.c:1983)
==72250==    by 0x10281097: expand_all_functions (cgraphunit.c:2119)
==72250==    by 0x10281097: symbol_table::compile() (cgraphunit.c:2472)
==72250==    by 0x10282D0B: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2562)
==72250==    by 0x1063E78F: compile_file() (toplev.c:508)
==72250==    by 0x1011535F: do_compile (toplev.c:1973)
==72250==    by 0x1011535F: toplev::main(int, char**) (toplev.c:2080)
==72250==  Address 0xe3bdb08 is 168 bytes inside a block of size 65,536 alloc'd
==72250==    at 0x4093D9C: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==72250==    by 0x10D2562B: xmalloc (xmalloc.c:147)
==72250==    by 0x10CC4FC3: mempool_obstack_chunk_alloc(unsigned long)
(memory-block.cc:51)
==72250==    by 0x466D2A3: _obstack_begin (in /usr/lib64/libc-2.20.so)
==72250==    by 0x107FF9BF: init_alias_vars() (tree-ssa-structalias.c:6658)
==72250==    by 0x10800117: compute_points_to_sets
(tree-ssa-structalias.c:6782)
==72250==    by 0x10800117: compute_may_aliases() (tree-ssa-structalias.c:7139)
==72250==    by 0x1055931B: execute_function_todo(function*, void*)
(passes.c:1932)
==72250==    by 0x1055A363: do_per_function(void (*)(function*, void*), void*)
(passes.c:1652)
==72250==    by 0x1055A59F: execute_todo(unsigned int) (passes.c:2018)
==72250==    by 0x1055D4F7: execute_one_pass(opt_pass*) (passes.c:2345)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==
==72250== Invalid write of size 4
==72250==    at 0x10203C18: bitmap_set_bit(bitmap_head*, int) (bitmap.c:584)
==72250==    by 0x102A4EF3: df_analyze() (df-core.c:1274)
==72250==    by 0x1094C43B: rs6000_analyze_swaps(function*) (rs6000.c:36112)
==72250==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==72250==    by 0x1027F6CB: cgraph_node::expand() (cgraphunit.c:1983)
==72250==    by 0x10281097: expand_all_functions (cgraphunit.c:2119)
==72250==    by 0x10281097: symbol_table::compile() (cgraphunit.c:2472)
==72250==    by 0x10282D0B: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2562)
==72250==    by 0x1063E78F: compile_file() (toplev.c:508)
==72250==    by 0x1011535F: do_compile (toplev.c:1973)
==72250==    by 0x1011535F: toplev::main(int, char**) (toplev.c:2080)
==72250==  Address 0xe3bdb10 is 176 bytes inside a block of size 65,536 alloc'd
==72250==    at 0x4093D9C: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==72250==    by 0x10D2562B: xmalloc (xmalloc.c:147)
==72250==    by 0x10CC4FC3: mempool_obstack_chunk_alloc(unsigned long)
(memory-block.cc:51)
==72250==    by 0x466D2A3: _obstack_begin (in /usr/lib64/libc-2.20.so)
==72250==    by 0x107FF9BF: init_alias_vars() (tree-ssa-structalias.c:6658)
==72250==    by 0x10800117: compute_points_to_sets
(tree-ssa-structalias.c:6782)
==72250==    by 0x10800117: compute_may_aliases() (tree-ssa-structalias.c:7139)
==72250==    by 0x1055931B: execute_function_todo(function*, void*)
(passes.c:1932)
==72250==    by 0x1055A363: do_per_function(void (*)(function*, void*), void*)
(passes.c:1652)
==72250==    by 0x1055A59F: execute_todo(unsigned int) (passes.c:2018)
==72250==    by 0x1055D4F7: execute_one_pass(opt_pass*) (passes.c:2345)
==72250==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==72250==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==72250==
...


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2015-09-21  9:28 ` trippels at gcc dot gnu.org
@ 2015-09-21  9:33 ` trippels at gcc dot gnu.org
  2015-09-21  9:35 ` trippels at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-21  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
==122519== Invalid write of size 4
==122519==    at 0x107D4EF0: vn_nary_op_insert_into(vn_nary_op_s*,
hash_table<vn_nary_op_hasher, xcallocator>*, bool) (tree-ssa-sccvn.c:2634)
==122519==    by 0x107D528B: sccvn_dom_walker::record_cond(basic_block_def*,
tree_code, tree_node*, tree_node*, bool) (tree-ssa-sccvn.c:4408)
==122519==    by 0x107D55EB: sccvn_dom_walker::record_conds(basic_block_def*,
tree_code, tree_node*, tree_node*, bool) (tree-ssa-sccvn.c:4448)
==122519==    by 0x107DC503:
sccvn_dom_walker::before_dom_children(basic_block_def*) (tree-ssa-sccvn.c:4550)
==122519==    by 0x10BC99EB: dom_walker::walk(basic_block_def*) (domwalk.c:177)
==122519==    by 0x107DE01F: run_scc_vn(vn_lookup_kind) (tree-ssa-sccvn.c:4680)
==122519==    by 0x107AAD47: (anonymous
namespace)::pass_fre::execute(function*) (tree-ssa-pre.c:4959)
==122519==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==122519==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==122519==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==122519==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==122519==    by 0x1055BA6F: do_per_function_toporder(void (*)(function*,
void*), void*) (passes.c:1729)
==122519==  Address 0xe2be758 is 1,368 bytes inside a block of size 65,536
alloc'd
==122519==    at 0x4093D9C: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==122519==    by 0x10D2562B: xmalloc (xmalloc.c:147)
==122519==    by 0x10299047: allocate (memory-block.h:56)
==122519==    by 0x10299047: base_pool_allocator<memory_block_pool>::allocate()
(alloc-pool.h:366)
==122519==    by 0x1033686F: allocate (alloc-pool.h:489)
==122519==    by 0x1033686F: et_new_tree (et-forest.c:464)
==122519==    by 0x102C2C07: calculate_dominance_info(cdi_direction)
(dominance.c:651)
==122519==    by 0x106C9EBB: (anonymous
namespace)::pass_build_ssa::execute(function*) (tree-into-ssa.c:2379)
==122519==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==122519==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==122519==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==122519==    by 0x1055BA6F: do_per_function_toporder(void (*)(function*,
void*), void*) (passes.c:1729)
==122519==    by 0x1055E3AB: execute_ipa_pass_list(opt_pass*) (passes.c:2739)
==122519==    by 0x10280E07: ipa_passes (cgraphunit.c:2259)
==122519==    by 0x10280E07: symbol_table::compile() (cgraphunit.c:2400)
==122519==
==122519== Invalid read of size 4
==122519==    at 0x107D4EA4: vn_nary_op_insert_into(vn_nary_op_s*,
hash_table<vn_nary_op_hasher, xcallocator>*, bool) (tree-ssa-sccvn.c:2636)
==122519==    by 0x107D528B: sccvn_dom_walker::record_cond(basic_block_def*,
tree_code, tree_node*, tree_node*, bool) (tree-ssa-sccvn.c:4408)
==122519==    by 0x107D55EB: sccvn_dom_walker::record_conds(basic_block_def*,
tree_code, tree_node*, tree_node*, bool) (tree-ssa-sccvn.c:4448)
==122519==    by 0x107DC503:
sccvn_dom_walker::before_dom_children(basic_block_def*) (tree-ssa-sccvn.c:4550)
==122519==    by 0x10BC99EB: dom_walker::walk(basic_block_def*) (domwalk.c:177)
==122519==    by 0x107DE01F: run_scc_vn(vn_lookup_kind) (tree-ssa-sccvn.c:4680)
==122519==    by 0x107AAD47: (anonymous
namespace)::pass_fre::execute(function*) (tree-ssa-pre.c:4959)
==122519==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==122519==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==122519==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==122519==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==122519==    by 0x1055BA6F: do_per_function_toporder(void (*)(function*,
void*), void*) (passes.c:1729)
==122519==  Address 0xe2be758 is 1,368 bytes inside a block of size 65,536
alloc'd
==122519==    at 0x4093D9C: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==122519==    by 0x10D2562B: xmalloc (xmalloc.c:147)
==122519==    by 0x10299047: allocate (memory-block.h:56)
==122519==    by 0x10299047: base_pool_allocator<memory_block_pool>::allocate()
(alloc-pool.h:366)
==122519==    by 0x1033686F: allocate (alloc-pool.h:489)
==122519==    by 0x1033686F: et_new_tree (et-forest.c:464)
==122519==    by 0x102C2C07: calculate_dominance_info(cdi_direction)
(dominance.c:651)
==122519==    by 0x106C9EBB: (anonymous
namespace)::pass_build_ssa::execute(function*) (tree-into-ssa.c:2379)
==122519==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==122519==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==122519==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==122519==    by 0x1055BA6F: do_per_function_toporder(void (*)(function*,
void*), void*) (passes.c:1729)
==122519==    by 0x1055E3AB: execute_ipa_pass_list(opt_pass*) (passes.c:2739)
==122519==    by 0x10280E07: ipa_passes (cgraphunit.c:2259)
==122519==    by 0x10280E07: symbol_table::compile() (cgraphunit.c:2400)
==122519==
==122519== Invalid read of size 4
==122519==    at 0x107D2168: vn_nary_op_eq(vn_nary_op_s const*, vn_nary_op_s
const*) (tree-ssa-sccvn.c:2421)
==122519==    by 0x107E0147: equal (tree-ssa-sccvn.c:147)
==122519==    by 0x107E0147: hash_table<vn_nary_op_hasher,
xcallocator>::find_slot_with_hash(vn_nary_op_s* const&, unsigned int,
insert_option) (hash-table.h:838)
==122519==    by 0x107D4EAF: vn_nary_op_insert_into(vn_nary_op_s*,
hash_table<vn_nary_op_hasher, xcallocator>*, bool) (tree-ssa-sccvn.c:2636)
==122519==    by 0x107D528B: sccvn_dom_walker::record_cond(basic_block_def*,
tree_code, tree_node*, tree_node*, bool) (tree-ssa-sccvn.c:4408)
==122519==    by 0x107D55EB: sccvn_dom_walker::record_conds(basic_block_def*,
tree_code, tree_node*, tree_node*, bool) (tree-ssa-sccvn.c:4448)
==122519==    by 0x107DC503:
sccvn_dom_walker::before_dom_children(basic_block_def*) (tree-ssa-sccvn.c:4550)
==122519==    by 0x10BC99EB: dom_walker::walk(basic_block_def*) (domwalk.c:177)
==122519==    by 0x107DE01F: run_scc_vn(vn_lookup_kind) (tree-ssa-sccvn.c:4680)
==122519==    by 0x107AAD47: (anonymous
namespace)::pass_fre::execute(function*) (tree-ssa-pre.c:4959)
==122519==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==122519==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==122519==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==122519==  Address 0xe2be758 is 1,368 bytes inside a block of size 65,536
alloc'd
==122519==    at 0x4093D9C: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==122519==    by 0x10D2562B: xmalloc (xmalloc.c:147)
==122519==    by 0x10299047: allocate (memory-block.h:56)
==122519==    by 0x10299047: base_pool_allocator<memory_block_pool>::allocate()
(alloc-pool.h:366)
==122519==    by 0x1033686F: allocate (alloc-pool.h:489)
==122519==    by 0x1033686F: et_new_tree (et-forest.c:464)
==122519==    by 0x102C2C07: calculate_dominance_info(cdi_direction)
(dominance.c:651)
==122519==    by 0x106C9EBB: (anonymous
namespace)::pass_build_ssa::execute(function*) (tree-into-ssa.c:2379)
==122519==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==122519==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==122519==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==122519==    by 0x1055BA6F: do_per_function_toporder(void (*)(function*,
void*), void*) (passes.c:1729)
==122519==    by 0x1055E3AB: execute_ipa_pass_list(opt_pass*) (passes.c:2739)
==122519==    by 0x10280E07: ipa_passes (cgraphunit.c:2259)
==122519==    by 0x10280E07: symbol_table::compile() (cgraphunit.c:2400)
==122519==
==122519== Invalid write of size 8
==122519==    at 0x409AAD4: memcpy (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==122519==    by 0x107D4F77: alloc_vn_nary_op (tree-ssa-sccvn.c:2615)
==122519==    by 0x107D4F77: vn_nary_op_insert_pieces(unsigned int, tree_code,
tree_node*, tree_node**, tree_node*, unsigned int) (tree-ssa-sccvn.c:2652)
==122519==    by 0x107D528B: sccvn_dom_walker::record_cond(basic_block_def*,
tree_code, tree_node*, tree_node*, bool) (tree-ssa-sccvn.c:4408)
==122519==    by 0x107D5607: sccvn_dom_walker::record_conds(basic_block_def*,
tree_code, tree_node*, tree_node*, bool) (tree-ssa-sccvn.c:4449)
==122519==    by 0x107DC503:
sccvn_dom_walker::before_dom_children(basic_block_def*) (tree-ssa-sccvn.c:4550)
==122519==    by 0x10BC99EB: dom_walker::walk(basic_block_def*) (domwalk.c:177)
==122519==    by 0x107DE01F: run_scc_vn(vn_lookup_kind) (tree-ssa-sccvn.c:4680)
==122519==    by 0x107AAD47: (anonymous
namespace)::pass_fre::execute(function*) (tree-ssa-pre.c:4959)
==122519==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==122519==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==122519==    by 0x1055D99B: execute_pass_list_1(opt_pass*) (passes.c:2386)
==122519==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==122519==  Address 0xe2be7a8 is 1,448 bytes inside a block of size 65,536
alloc'd
==122519==    at 0x4093D9C: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-ppc64le-linux.so)
==122519==    by 0x10D2562B: xmalloc (xmalloc.c:147)
==122519==    by 0x10299047: allocate (memory-block.h:56)
==122519==    by 0x10299047: base_pool_allocator<memory_block_pool>::allocate()
(alloc-pool.h:366)
==122519==    by 0x1033686F: allocate (alloc-pool.h:489)
==122519==    by 0x1033686F: et_new_tree (et-forest.c:464)
==122519==    by 0x102C2C07: calculate_dominance_info(cdi_direction)
(dominance.c:651)
==122519==    by 0x106C9EBB: (anonymous
namespace)::pass_build_ssa::execute(function*) (tree-into-ssa.c:2379)
==122519==    by 0x1055D46F: execute_one_pass(opt_pass*) (passes.c:2332)
==122519==    by 0x1055D983: execute_pass_list_1(opt_pass*) (passes.c:2385)
==122519==    by 0x1055DA23: execute_pass_list(function*, opt_pass*)
(passes.c:2396)
==122519==    by 0x1055BA6F: do_per_function_toporder(void (*)(function*,
void*), void*) (passes.c:1729)
==122519==    by 0x1055E3AB: execute_ipa_pass_list(opt_pass*) (passes.c:2739)
==122519==    by 0x10280E07: ipa_passes (cgraphunit.c:2259)
==122519==    by 0x10280E07: symbol_table::compile() (cgraphunit.c:2400)


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2015-09-21  9:33 ` trippels at gcc dot gnu.org
@ 2015-09-21  9:35 ` trippels at gcc dot gnu.org
  2015-09-21 10:42 ` trippels at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-21  9:35 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-pc-linux-gnu         |
                 CC|                            |miyuki at gcc dot gnu.org

--- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
I suspect r227817. Mikhail?


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2015-09-21  9:35 ` trippels at gcc dot gnu.org
@ 2015-09-21 10:42 ` trippels at gcc dot gnu.org
  2015-09-21 11:20 ` trippels at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-21 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
I guess valgrind just needs to be silenced in this case.
See valgrind related macros in gcc/system.h.


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2015-09-21 10:42 ` trippels at gcc dot gnu.org
@ 2015-09-21 11:20 ` trippels at gcc dot gnu.org
  2015-09-22  2:39 ` miyuki at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-21 11:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
--enable-checking=valgrind is enough


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2015-09-21 11:20 ` trippels at gcc dot gnu.org
@ 2015-09-22  2:39 ` miyuki at gcc dot gnu.org
  2015-09-22  2:42 ` miyuki at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: miyuki at gcc dot gnu.org @ 2015-09-22  2:39 UTC (permalink / raw)
  To: gcc-bugs

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

Mikhail Maltsev <miyuki at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |miyuki at gcc dot gnu.org

--- Comment #9 from Mikhail Maltsev <miyuki at gcc dot gnu.org> ---
I think, this patch falls under obvious, but I'll need to configure valgrind
build on my (sort of) CI server, and testing might take some time.

diff --git a/gcc/memory-block.h b/gcc/memory-block.h
index 1a495ea..8b1202b 100644
--- a/gcc/memory-block.h
+++ b/gcc/memory-block.h
@@ -57,6 +57,7 @@ memory_block_pool::allocate ()

   void *result = instance.m_blocks;
   instance.m_blocks = instance.m_blocks->m_next;
+  VALGRIND_DISCARD (VALGRIND_MAKE_MEM_UNDEFINED (result, block_size));
   return result;
 }


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2015-09-22  2:39 ` miyuki at gcc dot gnu.org
@ 2015-09-22  2:42 ` miyuki at gcc dot gnu.org
  2015-09-22  6:41 ` trippels at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: miyuki at gcc dot gnu.org @ 2015-09-22  2:42 UTC (permalink / raw)
  To: gcc-bugs

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

Mikhail Maltsev <miyuki at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
                   ` (8 preceding siblings ...)
  2015-09-22  2:42 ` miyuki at gcc dot gnu.org
@ 2015-09-22  6:41 ` trippels at gcc dot gnu.org
  2015-09-23  2:31 ` miyuki at gcc dot gnu.org
  2015-09-23  2:41 ` miyuki at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-09-22  6:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
A gave your patch a quick spin on gcc112 (compile farm machine).
It fixes the issue.


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
                   ` (9 preceding siblings ...)
  2015-09-22  6:41 ` trippels at gcc dot gnu.org
@ 2015-09-23  2:31 ` miyuki at gcc dot gnu.org
  2015-09-23  2:41 ` miyuki at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: miyuki at gcc dot gnu.org @ 2015-09-23  2:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Mikhail Maltsev <miyuki at gcc dot gnu.org> ---
Author: miyuki
Date: Wed Sep 23 02:31:14 2015
New Revision: 228033

URL: https://gcc.gnu.org/viewcvs?rev=228033&root=gcc&view=rev
Log:
Fix use of valgrind API

gcc/
        PR middle-end/67649
        * memory-block.h (memory_block_pool::allocate): Use valgrind API to
        mark the block as accessible.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/memory-block.h


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

* [Bug middle-end/67649] trunk build with valgrind fail in get_def_blocks_for
  2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
                   ` (10 preceding siblings ...)
  2015-09-23  2:31 ` miyuki at gcc dot gnu.org
@ 2015-09-23  2:41 ` miyuki at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: miyuki at gcc dot gnu.org @ 2015-09-23  2:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Mikhail Maltsev <miyuki at gcc dot gnu.org> ---
(In reply to Markus Trippelsdorf from comment #10)
> A gave your patch a quick spin on gcc112 (compile farm machine).
> It fixes the issue.

Thanks, Markus. I committed the fix.


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

end of thread, other threads:[~2015-09-23  2:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-20 15:12 [Bug c/67649] New: trunk build with valgrind fail in get_def_blocks_for dcb314 at hotmail dot com
2015-09-21  7:41 ` [Bug middle-end/67649] " rguenth at gcc dot gnu.org
2015-09-21  8:44 ` dcb314 at hotmail dot com
2015-09-21  9:28 ` trippels at gcc dot gnu.org
2015-09-21  9:33 ` trippels at gcc dot gnu.org
2015-09-21  9:35 ` trippels at gcc dot gnu.org
2015-09-21 10:42 ` trippels at gcc dot gnu.org
2015-09-21 11:20 ` trippels at gcc dot gnu.org
2015-09-22  2:39 ` miyuki at gcc dot gnu.org
2015-09-22  2:42 ` miyuki at gcc dot gnu.org
2015-09-22  6:41 ` trippels at gcc dot gnu.org
2015-09-23  2:31 ` miyuki at gcc dot gnu.org
2015-09-23  2:41 ` miyuki 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).