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_string<char, std::char_traits<char>,
std::allocator<char> > 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
-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== 

.....

==2065== Invalid read of size 8
==2065==    at 0xEDA014: search_line_sse42(unsigned char const*, unsigned char
const*) (lex.c:464)
==2065==    by 0xEDA53E: _cpp_clean_line (lex.c:742)
==2065==    by 0xEDAFCB: _cpp_get_fresh_line (lex.c:2035)
==2065==    by 0xEDC7B0: _cpp_lex_direct (lex.c:2100)
==2065==    by 0xEDD50B: _cpp_lex_token (lex.c:1974)
==2065==    by 0xEE2117: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2357)
==2065==    by 0x6EF622: c_lex_with_flags(tree_node**, unsigned int*, unsigned
char*, int) (c-lex.c:299)
==2065==    by 0x5C6C73: cp_lexer_get_preprocessor_token(cp_lexer*, cp_token*)
(parser.c:719)
==2065==    by 0x5F1035: c_parse_file() (parser.c:27358)
==2065==    by 0x6F60B4: c_common_parse_file() (c-opts.c:1138)
==2065==    by 0xA1E3FB: compile_file() (toplev.c:546)
==2065==    by 0xA20019: toplev_main(int, char**) (toplev.c:1863)
==2065==  Address 0x49f64f0 is 9,696 bytes inside a block of size 9,700 alloc'd
==2065==    at 0x480890E: realloc (vg_replace_malloc.c:662)
==2065==    by 0xF0861C: xrealloc (xmalloc.c:179)
==2065==    by 0xECED58: _cpp_convert_input (charset.c:1734)
==2065==    by 0xED772A: read_file(cpp_reader*, _cpp_file*) (files.c:685)
==2065==    by 0xED82FD: _cpp_stack_file (files.c:756)
==2065==    by 0xED0140: do_include_common(cpp_reader*, include_type)
(directives.c:792)
==2065==    by 0xED0F80: _cpp_handle_directive (directives.c:491)
==2065==    by 0xEDD53C: _cpp_lex_token (lex.c:1986)
==2065==    by 0xEE2117: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2357)
==2065==    by 0x6EF622: c_lex_with_flags(tree_node**, unsigned int*, unsigned
char*, int) (c-lex.c:299)
==2065==    by 0x5C6C73: cp_lexer_get_preprocessor_token(cp_lexer*, cp_token*)
(parser.c:719)
==2065==    by 0x5F1035: c_parse_file() (parser.c:27358)
==2065== 
==2065== Invalid read of size 8
==2065==    at 0xEDA046: search_line_sse42(unsigned char const*, unsigned char
const*) (lex.c:445)
==2065==    by 0xEDA53E: _cpp_clean_line (lex.c:742)
==2065==    by 0xEDAFCB: _cpp_get_fresh_line (lex.c:2035)
==2065==    by 0xEDC7B0: _cpp_lex_direct (lex.c:2100)
==2065==    by 0xEDD50B: _cpp_lex_token (lex.c:1974)
==2065==    by 0xEE2117: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2357)
==2065==    by 0x6EF622: c_lex_with_flags(tree_node**, unsigned int*, unsigned
char*, int) (c-lex.c:299)
==2065==    by 0x5C6C73: cp_lexer_get_preprocessor_token(cp_lexer*, cp_token*)
(parser.c:719)
==2065==    by 0x5F1035: c_parse_file() (parser.c:27358)
==2065==    by 0x6F60B4: c_common_parse_file() (c-opts.c:1138)
==2065==    by 0xA1E3FB: compile_file() (toplev.c:546)
==2065==    by 0xA20019: toplev_main(int, char**) (toplev.c:1863)
==2065==  Address 0x4b21ae0 is 0 bytes after a block of size 176 alloc'd
==2065==    at 0x480890E: realloc (vg_replace_malloc.c:662)
==2065==    by 0xF0861C: xrealloc (xmalloc.c:179)
==2065==    by 0xECED58: _cpp_convert_input (charset.c:1734)
==2065==    by 0xED772A: read_file(cpp_reader*, _cpp_file*) (files.c:685)
==2065==    by 0xED82FD: _cpp_stack_file (files.c:756)
==2065==    by 0xED0140: do_include_common(cpp_reader*, include_type)
(directives.c:792)
==2065==    by 0xED0F80: _cpp_handle_directive (directives.c:491)
==2065==    by 0xEDD53C: _cpp_lex_token (lex.c:1986)
==2065==    by 0xEE2117: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2357)
==2065==    by 0x6EF622: c_lex_with_flags(tree_node**, unsigned int*, unsigned
char*, int) (c-lex.c:299)
==2065==    by 0x5C6C73: cp_lexer_get_preprocessor_token(cp_lexer*, cp_token*)
(parser.c:719)
==2065==    by 0x5F1035: c_parse_file() (parser.c:27358)
==2065== 
==2065== Invalid read of size 8
==2065==    at 0xEDA014: search_line_sse42(unsigned char const*, unsigned char
const*) (lex.c:464)
==2065==    by 0xEDA53E: _cpp_clean_line (lex.c:742)
==2065==    by 0xEDAB56: _cpp_skip_block_comment (lex.c:999)
==2065==    by 0xEDD196: _cpp_lex_direct (lex.c:2229)
==2065==    by 0xEDD50B: _cpp_lex_token (lex.c:1974)
==2065==    by 0xECFB3A: check_eol(cpp_reader*, bool) (directives.c:220)
==2065==    by 0xED0687: do_endif(cpp_reader*) (directives.c:2010)
==2065==    by 0xED0F80: _cpp_handle_directive (directives.c:491)
==2065==    by 0xEDD53C: _cpp_lex_token (lex.c:1986)
==2065==    by 0xEE2117: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2357)
==2065==    by 0x6EF622: c_lex_with_flags(tree_node**, unsigned int*, unsigned
char*, int) (c-lex.c:299)
==2065==    by 0x5C6C73: cp_lexer_get_preprocessor_token(cp_lexer*, cp_token*)
(parser.c:719)
==2065==  Address 0x4b3fa40 is 13,504 bytes inside a block of size 13,507
alloc'd
==2065==    at 0x480890E: realloc (vg_replace_malloc.c:662)
==2065==    by 0xF0861C: xrealloc (xmalloc.c:179)
==2065==    by 0xECED58: _cpp_convert_input (charset.c:1734)
==2065==    by 0xED772A: read_file(cpp_reader*, _cpp_file*) (files.c:685)
==2065==    by 0xED82FD: _cpp_stack_file (files.c:756)
==2065==    by 0xED0140: do_include_common(cpp_reader*, include_type)
(directives.c:792)
==2065==    by 0xED0F80: _cpp_handle_directive (directives.c:491)
==2065==    by 0xEDD53C: _cpp_lex_token (lex.c:1986)
==2065==    by 0xEE2117: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2357)
==2065==    by 0x6EF622: c_lex_with_flags(tree_node**, unsigned int*, unsigned
char*, int) (c-lex.c:299)
==2065==    by 0x5C6C73: cp_lexer_get_preprocessor_token(cp_lexer*, cp_token*)
(parser.c:719)
==2065==    by 0x5F1100: c_parse_file() (parser.c:598)
==2065== 
/home/dimhen/src/CSPbuild/shared/cplib/DateTime.cpp: In function
'CryptoPro::GeneralizedTimeToTm(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > 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.
==2065== 
==2065== HEAP SUMMARY:
==2065==     in use at exit: 1,912,637 bytes in 11,020 blocks
==2065==   total heap usage: 463,331 allocs, 452,311 frees, 503,527,977 bytes
allocated
==2065== 
==2065== LEAK SUMMARY:
==2065==    definitely lost: 5,936 bytes in 7 blocks
==2065==    indirectly lost: 0 bytes in 0 blocks
==2065==      possibly lost: 80,320 bytes in 10 blocks
==2065==    still reachable: 1,826,381 bytes in 11,003 blocks
==2065==         suppressed: 0 bytes in 0 blocks
==2065== Rerun with --leak-check=full to see details of leaked memory
==2065== 
==2065== For counts of detected and suppressed errors, rerun with: -v
==2065== ERROR SUMMARY: 359 errors from 3 contexts (suppressed: 2 from 2)

Reply via email to