New bootstrap failure ppc64

Diego Novillo dnovillo@google.com
Thu Jul 12 10:04:00 GMT 2007


I still haven't been able to get a clean bootstrap on trunk for ppc64.
This time, it seems as if a recent PRE change is overwriting memory.
The failure shows up while building libgcc with the stage1 compiler (attached).

Running cc1 with valgrind shows a memory overwrite problem in tree-ssa-pre.c.
So the failure may be related to this patch:

+2007-07-11  Daniel Berlin  <dberlin@dberlin.org>
+
+       PR tree-optimization/32663
+
+       * tree.h (VALUE_HANDLE_VUSES): Remove.
+       (struct tree_value_handle): Remove vuses.
+
+       * tree-vn.c (create_value_handle_for_expr): Don't set
+       VALUE_HANDLE_VUSES.
+
+       * tree-ssa-pre.c (expression_vuses): New.
+       (alloc_expression_id): Set up expression_vuses.
+       (get_expression_vuses): New.
+       (set_expression_vuses): Ditto.
+       (clear_expression_ids): Modify for expression_vuses.
+       (phi_translate_1): Ditto.
+       (phi_translate_set): Ditto.
+       (value_dies_in_block_x): Ditto
+       (valid_in_sets): Ditto.
+       (add_to_sets): Ditto.
+       (find_existing_value_expr): Ditto.
+       (create_value_handle_for_expr): Ditto.
+       (make_values_for_stmt): Ditto.
+       (vuse_equiv): Remove.

Valgrind shows:

$ valgrind /home/dnovillo/perf/sbox/gcc/local.ppc64/bld/./gcc/cc1 -fpreprocessed libgcc2.i -quiet -dumpbase libgcc2.c -mno-minimal-toc -mlong-double-128 -auxbase-strip _lshrdi3.o -g -g -g -O2 -O2 -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fkeep-inline-functions -fPIC -fvisibility=hidden -o libgcc2.s
==15400== Memcheck, a memory error detector.
==15400== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==15400== Using LibVEX rev 1658, a library for dynamic binary translation.
==15400== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==15400== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
==15400== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==15400== For more details, rerun with: -v
==15400==
GNU C version 4.3.0 20070712 (experimental) (powerpc64-unknown-linux-gnu)
        compiled by GNU C version 4.1.2 20070626 (Red Hat 4.1.2-13), GMP version 4.2.1, MPFR version 2.2.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: f98afd126838ac20d9a920faa1d71e5c
==15400== Invalid read of size 8
==15400==    at 0x104AE494: VEC_vuse_vec_base_replace (tree-ssa-pre.c:189)
==15400==    by 0x104AE440: set_expression_vuses (tree-ssa-pre.c:264)
==15400==    by 0x104ADCD8: phi_translate_1 (tree-ssa-pre.c:1221)
==15400==    by 0x104AE6CC: phi_translate (tree-ssa-pre.c:1355)
==15400==    by 0x104AE778: phi_translate_set (tree-ssa-pre.c:1381)
==15400==    by 0x104AFB9C: defer_or_phi_translate_block (tree-ssa-pre.c:1643)
==15400==    by 0x104AFDF4: compute_antic_aux (tree-ssa-pre.c:1704)
==15400==    by 0x104B19D8: compute_antic (tree-ssa-pre.c:2005)
==15400==    by 0x104B89DC: execute_pre (tree-ssa-pre.c:3948)
==15400==    by 0x104B8B44: do_pre (tree-ssa-pre.c:3981)
==15400==    by 0x102B0A04: execute_one_pass (passes.c:1125)
==15400==    by 0x102B0C38: execute_pass_list (passes.c:1178)
==15400==  Address 0x4944C78 is 0 bytes after a block of size 440 free'd
==15400==    at 0x4017090: realloc (vg_replace_malloc.c:306)
==15400==    by 0x108D7FE4: xrealloc (xmalloc.c:179)
==15400==    by 0x1055CBFC: vec_heap_o_reserve_1 (vec.c:177)
==15400==    by 0x1055CC9C: vec_heap_p_reserve (vec.c:190)
==15400==    by 0x104AB6D8: VEC_vuse_vec_heap_reserve (tree-ssa-pre.c:190)
==15400==    by 0x104AB5E4: VEC_vuse_vec_heap_safe_push (tree-ssa-pre.c:190)
==15400==    by 0x104AB29C: alloc_expression_id (tree-ssa-pre.c:212)
==15400==    by 0x104AB198: get_or_alloc_expression_id (tree-ssa-pre.c:237)
==15400==    by 0x104AE42C: set_expression_vuses (tree-ssa-pre.c:264)
==15400==    by 0x104ADCD8: phi_translate_1 (tree-ssa-pre.c:1221)
==15400==    by 0x104AE6CC: phi_translate (tree-ssa-pre.c:1355)
==15400==    by 0x104AE778: phi_translate_set (tree-ssa-pre.c:1381)
==15400==
==15400== Invalid write of size 8
==15400==    at 0x104AE4B4: VEC_vuse_vec_base_replace (tree-ssa-pre.c:189)
==15400==    by 0x104AE440: set_expression_vuses (tree-ssa-pre.c:264)
==15400==    by 0x104ADCD8: phi_translate_1 (tree-ssa-pre.c:1221)
==15400==    by 0x104AE6CC: phi_translate (tree-ssa-pre.c:1355)
==15400==    by 0x104AE778: phi_translate_set (tree-ssa-pre.c:1381)
==15400==    by 0x104AFB9C: defer_or_phi_translate_block (tree-ssa-pre.c:1643)
==15400==    by 0x104AFDF4: compute_antic_aux (tree-ssa-pre.c:1704)
==15400==    by 0x104B19D8: compute_antic (tree-ssa-pre.c:2005)
==15400==    by 0x104B89DC: execute_pre (tree-ssa-pre.c:3948)
==15400==    by 0x104B8B44: do_pre (tree-ssa-pre.c:3981)
==15400==    by 0x102B0A04: execute_one_pass (passes.c:1125)
==15400==    by 0x102B0C38: execute_pass_list (passes.c:1178)
==15400==  Address 0x4944C78 is 0 bytes after a block of size 440 free'd
==15400==    at 0x4017090: realloc (vg_replace_malloc.c:306)
==15400==    by 0x108D7FE4: xrealloc (xmalloc.c:179)
==15400==    by 0x1055CBFC: vec_heap_o_reserve_1 (vec.c:177)
==15400==    by 0x1055CC9C: vec_heap_p_reserve (vec.c:190)
==15400==    by 0x104AB6D8: VEC_vuse_vec_heap_reserve (tree-ssa-pre.c:190)
==15400==    by 0x104AB5E4: VEC_vuse_vec_heap_safe_push (tree-ssa-pre.c:190)
==15400==    by 0x104AB29C: alloc_expression_id (tree-ssa-pre.c:212)
==15400==    by 0x104AB198: get_or_alloc_expression_id (tree-ssa-pre.c:237)
==15400==    by 0x104AE42C: set_expression_vuses (tree-ssa-pre.c:264)
==15400==    by 0x104ADCD8: phi_translate_1 (tree-ssa-pre.c:1221)
==15400==    by 0x104AE6CC: phi_translate (tree-ssa-pre.c:1355)
==15400==    by 0x104AE778: phi_translate_set (tree-ssa-pre.c:1381)
==15400==
==15400== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 2 from 1)
==15400== malloc/free: in use at exit: 650,642 bytes in 3,203 blocks.
==15400== malloc/free: 9,390 allocs, 6,187 frees, 4,095,695 bytes allocated.
==15400== For counts of detected errors, rerun with: -v
==15400== searching for pointers to 3,203 not-freed blocks.
==15400== checked 8,254,136 bytes.
==15400==
==15400== LEAK SUMMARY:
==15400==    definitely lost: 17,104 bytes in 115 blocks.
==15400==      possibly lost: 0 bytes in 0 blocks.
==15400==    still reachable: 633,538 bytes in 3,088 blocks.
==15400==         suppressed: 0 bytes in 0 blocks.
==15400== Use --leak-check=full to see details of leaked memory.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libgcc-ice.txt
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20070712/3fcaf864/attachment.txt>


More information about the Gcc mailing list