[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 --- Comment #8 from Richard Guenther rguenth at gcc dot gnu.org 2012-09-24 09:26:25 UTC --- If it's triggered by GC I suggest to try reducing with --param ggc-min-expand=0 --param ggc-min-heapsize=0 (not that this will make it any faster ;))
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 --- Comment #9 from Zdenek Sojka zsojka at seznam dot cz 2012-09-24 09:38:40 UTC --- If I remember correctly, with --param ggc-min-expand=0 --param ggc-min-heapsize=0 the program didn't crash - maybe the space was reallocated of another tree, so the pointer became valid again. I tried to compile gcc with --disable-bootstrap --enable-checking=valgrind, but the compilation fails when linking (saying I should use -fPIC). That would give me the chance to use valgrind to find the invalid memory access (memory allocations aren't hooked by valgrind here; valgrind checking adds explicit calls to valgrind routines). I am not reducing the file any longer, if it's caused by invalid memory references, the crash could appear and disappear 'randomly' with changes in the code.
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 --- Comment #10 from Dmitry G. Dyachenko dimhen at gmail dot com 2012-09-24 09:46:12 UTC --- for me testcase FAIl with -O2 -flto --param ggc-min-heapsize=0 and OK with -O3 -flto --param ggc-min-expand=0
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 --- Comment #11 from Markus Trippelsdorf markus at trippelsdorf dot de 2012-09-24 12:27:28 UTC --- I get: ==24033== Memcheck, a memory error detector ==24033== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==24033== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==24033== Command: /var/tmp/foo/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -fpreprocessed test.ii -quiet -dumpbase test.ii -mtune=generic -march=x86-64 -auxbase test -O2 -Wfatal-errors -w -std=c++11 -flto -flto-partition=none --param ggc-min-heapsize=0 -o /tmp/ccj0VbuA.s ==24033== ==24033== Invalid read of size 2 ==24033==at 0x947E70: lto_output_tree(output_block*, tree_node*, bool, bool) (lto-streamer-out.c:127) ==24033==by 0xB8D64F: streamer_write_tree_body(output_block*, tree_node*, bool) (tree-streamer-out.c:672) ==24033==by 0x948569: lto_output_tree(output_block*, tree_node*, bool, bool) (lto-streamer-out.c:339) ==24033==by 0xB8CDE3: streamer_write_tree_body(output_block*, tree_node*, bool) (tree-streamer-out.c:507) ==24033==by 0x948569: lto_output_tree(output_block*, tree_node*, bool, bool) (lto-streamer-out.c:339) ==24033==by 0x948CAE: lto_output() (lto-streamer-out.c:751) ==24033==by 0x97DBE0: ipa_write_summaries_2(opt_pass*, lto_out_decl_state*) (passes.c:2284) ==24033==by 0x97EA2D: ipa_write_summaries() (passes.c:2314) ==24033==by 0x782919: compile() (cgraphunit.c:1866) ==24033==by 0x782B54: finalize_compilation_unit() (cgraphunit.c:2080) ==24033==by 0x5AE5FA: cp_write_global_declarations() (decl2.c:4024) ==24033==by 0xA1D784: compile_file() (toplev.c:560) ==24033== Address 0x8c46af0 is not stack'd, malloc'd or (recently) free'd ==24033== ==24033== Invalid read of size 2 ==24033==at 0x947E99: lto_output_tree(output_block*, tree_node*, bool, bool) (tree-streamer.h:63) ==24033==by 0xB8D64F: streamer_write_tree_body(output_block*, tree_node*, bool) (tree-streamer-out.c:672) ==24033==by 0x948569: lto_output_tree(output_block*, tree_node*, bool, bool) (lto-streamer-out.c:339) ==24033==by 0xB8CDE3: streamer_write_tree_body(output_block*, tree_node*, bool) (tree-streamer-out.c:507) ==24033==by 0x948569: lto_output_tree(output_block*, tree_node*, bool, bool) (lto-streamer-out.c:339) ==24033==by 0x948CAE: lto_output() (lto-streamer-out.c:751) ==24033==by 0x97DBE0: ipa_write_summaries_2(opt_pass*, lto_out_decl_state*) (passes.c:2284) ==24033==by 0x97EA2D: ipa_write_summaries() (passes.c:2314) ==24033==by 0x782919: compile() (cgraphunit.c:1866) ==24033==by 0x782B54: finalize_compilation_unit() (cgraphunit.c:2080) ==24033==by 0x5AE5FA: cp_write_global_declarations() (decl2.c:4024) ==24033==by 0xA1D784: compile_file() (toplev.c:560) ==24033== Address 0x8c46af0 is not stack'd, malloc'd or (recently) free'd ==24033== test.ii: In member function ‘AirportTileTableIterator::operator++()’: test.ii:10619:6: internal compiler error: tree code ‘�F���’ is not supported in LTO streams } ^ Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions.
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2012-09-24 AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #12 from Richard Guenther rguenth at gcc dot gnu.org 2012-09-24 12:42:27 UTC --- The backtrace hints at trees containing DECL_VALUE/DEBUG_EXPRs. We are indeed writing TREE_BLOCK which has been garbage-collected. (gdb) up #3 0x00dcf803 in write_ts_exp_tree_pointers (ob=0x1c809d0, expr=0x74de, ref_p=true) at /space/rguenther/src/svn/trunk/gcc/tree-streamer-out.c:674 674 stream_write_tree (ob, TREE_BLOCK (expr), ref_p); ... #7 0x00dcea3c in write_ts_decl_common_tree_pointers (ob=0x1c809d0, expr=0x74ddc2f8, ref_p=true) at /space/rguenther/src/svn/trunk/gcc/tree-streamer-out.c:509 509 stream_write_tree (ob, DECL_DEBUG_EXPR (expr), ref_p); ... #11 0x00ad8e10 in output_struct_function_base (ob=0x1c809d0, fn=0x75440c80) at /space/rguenther/src/svn/trunk/gcc/lto-streamer-out.c:751 748 /* Output all the local variables in the function. */ 749 streamer_write_hwi (ob, VEC_length (tree, fn-local_decls)); 750 FOR_EACH_VEC_ELT (tree, fn-local_decls, i, t) 751 stream_write_tree (ob, t, true); so somehow GC does not mark this block as used (or it is not marked as used in the block tree and thus removed in remove_unused_scope_block_p). We indeed forget to walk all locals in clear_unused_block_pointer (). Testing Index: gcc/tree-ssa-live.c === --- gcc/tree-ssa-live.c (revision 191664) +++ gcc/tree-ssa-live.c (working copy) @@ -620,11 +620,6 @@ clear_unused_block_pointer_1 (tree *tp, if (EXPR_P (*tp) TREE_BLOCK (*tp) !TREE_USED (TREE_BLOCK (*tp))) TREE_SET_BLOCK (*tp, NULL); - if (TREE_CODE (*tp) == VAR_DECL DECL_DEBUG_EXPR_IS_FROM (*tp)) -{ - tree debug_expr = DECL_DEBUG_EXPR (*tp); - walk_tree (debug_expr, clear_unused_block_pointer_1, NULL, NULL); -} return NULL_TREE; } @@ -636,6 +631,16 @@ clear_unused_block_pointer () { basic_block bb; gimple_stmt_iterator gsi; + tree t; + unsigned i; + + FOR_EACH_VEC_ELT (tree, cfun-local_decls, i, t) +if (TREE_CODE (t) == VAR_DECL DECL_DEBUG_EXPR_IS_FROM (t)) + { + tree debug_expr = DECL_DEBUG_EXPR (t); + walk_tree (debug_expr, clear_unused_block_pointer_1, NULL, NULL); + } + FOR_EACH_BB (bb) for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (gsi)) {
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 --- Comment #13 from Richard Guenther rguenth at gcc dot gnu.org 2012-09-24 15:03:01 UTC --- Author: rguenth Date: Mon Sep 24 15:02:53 2012 New Revision: 191669 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191669 Log: 2012-09-24 Richard Guenther rguent...@suse.de PR middle-end/54632 * tree-ssa-live.c (clear_unused_block_pointer_1): Do not handle DECL_DEBUG_EXPR_IS_FROM here... (clear_unused_block_pointer): ... but here when walking all local decls. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-ssa-live.c
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Comment #14 from Richard Guenther rguenth at gcc dot gnu.org 2012-09-24 15:03:28 UTC --- Fixed.
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 --- Comment #3 from Dmitry G. Dyachenko dimhen at gmail dot com 2012-09-23 09:22:20 UTC --- 191649 FAIL and, sorry, i cant reduce testcase :( if i run 'g++ -DHAVE_CONFIG_H -I. -I/home/dimhen/src/CSPbuild/shared/cplib -I../.. -I/usr/local/include -DUNIX -DLINUX -I/home/dimhen/src/CSPbuild -I/home/dimhen/src/CSPbuild/reader/include -I/home/dimhen/src/CSPbuild/CSP/src/include -I/home/dimhen/src/CSPbuild/shared/include -I/home/dimhen/src/CSPbuild/shared/include/atl -I/home/dimhen/src/CSPbuild/shared/include/cplib -DNO_ASN1_RT_REDUNDANT -D_COMPACT -fno-common -Ofast -flto -flto-partition=none -pipe -m64 -Woverloaded-virtual -fvisibility-inlines-hidden -MT DateTime.lo -MD -MP -MF .deps/DateTime.Tpo -c /home/dimhen/src/CSPbuild/shared/cplib/DateTime.cpp -fPIC -DPIC -o .libs/DateTime.o' i receive /home/dimhen/src/CSPbuild/shared/cplib/DateTime.cpp: In function 'CryptoPro::GeneralizedTimeToTm(std::basic_stringchar, std::char_traitschar, std::allocatorchar const, unsigned int, bool)': /home/dimhen/src/CSPbuild/shared/cplib/DateTime.cpp:934:1: internal compiler error: tree code '�F��D��`Hc���D�Hc�f;�`�bFD���(D���� �� HD���H!��=�' is not supported in LTO streams } // namespace CryptoPro ^ Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. if i add '-save-temps' and recompile ii-file, then i not receive any err message $ LANG=C g++ -DHAVE_CONFIG_H -I. -I/home/dimhen/src/CSPbuild/shared/cplib -I../.. -I/usr/local/include -DUNIX -DLINUX -I/home/dimhen/src/CSPbuild -I/home/dimhen/src/CSPbuild/reader/include -I/home/dimhen/src/CSPbuild/CSP/src/include -I/home/dimhen/src/CSPbuild/shared/include -I/home/dimhen/src/CSPbuild/shared/include/atl -I/home/dimhen/src/CSPbuild/shared/include/cplib -DNO_ASN1_RT_REDUNDANT -D_COMPACT -fno-common -Ofast -flto -flto-partition=none -pipe -m64 -Woverloaded-virtual -fvisibility-inlines-hidden -MT DateTime.lo -MD -MP -MF .deps/DateTime.Tpo -c /home/dimhen/src/CSPbuild/shared/cplib/DateTime.cpp -fPIC -DPIC -o .libs/DateTime.o -save-temps g++: warning: -pipe ignored because -save-temps specified $ ll -tr итого 1712 -rw-rw-r--. 1 dimhen dimhen 22385 сент. 23 13:04 Makefile -rw-rw-r--. 1 dimhen dimhen260 сент. 23 13:06 Blob.lo -rw-rw-r--. 1 dimhen dimhen 854468 сент. 23 13:18 DateTime.ii -rw-rw-r--. 1 dimhen dimhen 864446 сент. 23 13:18 DateTime.s $ LANG=C g++ -DHAVE_CONFIG_H -I. -I/home/dimhen/src/CSPbuild/shared/cplib -I../.. -I/usr/local/include -DUNIX -DLINUX -I/home/dimhen/src/CSPbuild -I/home/dimhen/src/CSPbuild/reader/include -I/home/dimhen/src/CSPbuild/CSP/src/include -I/home/dimhen/src/CSPbuild/shared/include -I/home/dimhen/src/CSPbuild/shared/include/atl -I/home/dimhen/src/CSPbuild/shared/include/cplib -DNO_ASN1_RT_REDUNDANT -D_COMPACT -fno-common -Ofast -flto -flto-partition=none -pipe -m64 -Woverloaded-virtual -fvisibility-inlines-hidden -MT DateTime.lo -MD -MP -MF .deps/DateTime.Tpo -c ./DateTime.ii -fPIC -DPIC -o .libs/DateTime.o so, how i can help?
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 --- Comment #4 from Dmitry G. Dyachenko dimhen at gmail dot com 2012-09-23 09:33:32 UTC --- new in r191649 is eer.location -- DateTime.cpp:934:1 line 934 is outermost '}' in src file
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 --- Comment #5 from Zdenek Sojka zsojka at seznam dot cz 2012-09-23 10:50:29 UTC --- Created attachment 28253 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28253 partially reduced testcase Reducing goes very slowly, this has been reducing for over a day
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 --- Comment #6 from Dmitry G. Dyachenko dimhen at gmail dot com 2012-09-23 10:55:08 UTC --- valgrind show no any appropriate with debug-compiled gcc, only over-optimized access in parser. Hmmm, i am under impression that BUILD_CONFIG=bootstrap-O1 has no effect, and BOOT_CFLAGS='-O0 -g' has no effect too. -- gcc is compiled with '-O2 -g' But, at least, i made it :) according http://gcc.gnu.org/install/build.html ~/src/gcc-current/configure --prefix=/usr/local/gcc_current --with-multilib-list=m64 --enable-__cxa_atexit --enable-shared --enable-checking=df,fold,rtl,tree,yes --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,lto --enable-plugin --enable-version-specific-runtime-libs --enable-bootstrap4 BUILD_CONFIG=bootstrap-O1 make -j7 make install -j4 cp /usr/local/gcc_current/lib/gcc/x86_64-unknown-linux-gnu/lib64/libgcc_s.so /usr/local/gcc_current/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/ $g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /home/dimhen/src/gcc-current/configure --prefix=/usr/local/gcc_current --with-multilib-list=m64 --enable-__cxa_atexit --enable-shared --enable-checking=df,fold,rtl,tree,yes --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,lto --enable-plugin --enable-version-specific-runtime-libs --enable-bootstrap4 Thread model: posix gcc version 4.8.0 20120923 (experimental) [trunk revision 191649] (GCC) $ /usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -quiet -v -I . -I /home/dimhen/src/CSPbuild/shared/cplib -I ../.. -I /usr/local/include -I /home/dimhen/src/CSPbuild -I /home/dimhen/src/CSPbuild/reader/include -I /home/dimhen/src/CSPbuild/CSP/src/include -I /home/dimhen/src/CSPbuild/shared/include -I /home/dimhen/src/CSPbuild/shared/include/atl -I /home/dimhen/src/CSPbuild/shared/include/cplib -MD .libs/DateTime.d -MF .deps/DateTime.Tpo -MP -MT DateTime.lo -D_GNU_SOURCE -D HAVE_CONFIG_H -D UNIX -D LINUX -D NO_ASN1_RT_REDUNDANT -D _COMPACT -D PIC /home/dimhen/src/CSPbuild/shared/cplib/DateTime.cpp -quiet -dumpbase DateTime.cpp -m64 -mtune=generic -march=x86-64 -auxbase-strip .libs/DateTime.o -Ofast -Woverloaded-virtual -version -fno-common -flto -flto-partition=none -fvisibility-inlines-hidden -fPIC -o .libs/DateTime.o /home/dimhen/src/CSPbuild/shared/cplib/DateTime.cpp: In function 'CryptoPro::GeneralizedTimeToTm(std::basic_stringchar, std::char_traitschar, std::allocatorchar const, unsigned int, bool)': /home/dimhen/src/CSPbuild/shared/cplib/DateTime.cpp:934:1: internal compiler error: tree code '�F��D���Hc��' is not supported in LTO streams } // namespace CryptoPro ^ Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. $ valgrind /usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -quiet -v -I . -I /home/dimhen/src/CSPbuild/shared/cplib -I ../.. -I /usr/local/include -I /home/dimhen/src/CSPbuild -I /home/dimhen/src/CSPbuild/reader/include -I /home/dimhen/src/CSPbuild/CSP/src/include -I /home/dimhen/src/CSPbuild/shared/include -I /home/dimhen/src/CSPbuild/shared/include/atl -I /home/dimhen/src/CSPbuild/shared/include/cplib -MD .libs/DateTime.d -MF .deps/DateTime.Tpo -MP -MT DateTime.lo -D_GNU_SOURCE -D HAVE_CONFIG_H -D UNIX -D LINUX -D NO_ASN1_RT_REDUNDANT -D _COMPACT -D PIC /home/dimhen/src/CSPbuild/shared/cplib/DateTime.cpp -quiet -dumpbase DateTime.cpp -m64 -mtune=generic -march=x86-64 -auxbase-strip .libs/DateTime.o -Ofast -Woverloaded-virtual -version -fno-common -flto -flto-partition=none -fvisibility-inlines-hidden -fPIC -o .libs/DateTime.o [dimhen@dim cplib]$ valgrind /usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -quiet -v -I . -I /home/dimhen/src/CSPbuild/shared/cplib -I ../.. -I /usr/local/include -I /home/dimhen/src/CSPbuild -I /home/dimhen/src/CSPbuild/reader/include -I /home/dimhen/src/CSPbuild/CSP/src/include -I /home/dimhen/src/CSPbuild/shared/include -I /home/dimhen/src/CSPbuild/shared/include/atl -I /home/dimhen/src/CSPbuild/shared/include/cplib -MD .libs/DateTime.d -MF .deps/DateTime.Tpo -MP -MT DateTime.lo -D_GNU_SOURCE -D HAVE_CONFIG_H -D UNIX -D LINUX -D NO_ASN1_RT_REDUNDANT -D _COMPACT -D PIC /home/dimhen/src/CSPbuild/shared/cplib/DateTime.cpp -quiet -dumpbase DateTime.cpp -m64 -mtune=generic -march=x86-64 -auxbase-strip .libs/DateTime.o -Ofast -Woverloaded-virtual -version -fno-common -flto -flto-partition=none -fvisibility-inlines-hidden -fPIC -o .libs/DateTime.o ==2065== Memcheck, a memory error detector ==2065== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==2065== Using Valgrind-3.9.0.SVN and LibVEX; rerun with -h for copyright info ==2065== Command: /usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 Markus Trippelsdorf markus at trippelsdorf dot de changed: What|Removed |Added CC||markus at trippelsdorf dot ||de --- Comment #7 from Markus Trippelsdorf markus at trippelsdorf dot de 2012-09-23 13:05:43 UTC --- (In reply to comment #5) Created attachment 28253 [details] partially reduced testcase Reducing goes very slowly, this has been reducing for over a day If the failure depends somehow on the size of the input file then delta will approach it only asymptotically...
[Bug lto/54632] [4.8 Regression] not supported in LTO streams : tree code '�F ��D�� `
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54632 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added CC||dehao at gcc dot gnu.org Target Milestone|--- |4.8.0 Summary|not supported in LTO|[4.8 Regression] not |streams : tree code '�F |supported in LTO streams : |��D�� ` |tree code '�F ��D�� ` --- Comment #2 from Richard Guenther rguenth at gcc dot gnu.org 2012-09-20 11:31:49 UTC --- It's outputting a garbage collected tree. Suspect it was a BLOCK.