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

            Bug ID: 63319
           Summary: [5 Regression] ICE: Segmentation fault building qt5
                    with pch
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: pch
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org

markus@x4 corelib % /var/tmp/gcc_test/usr/local/bin/g++ -c -march=amdfam10 -O2
-g -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -W -fPIC qhash.ii
tools/qhash.cpp: In function ‘unsigned int _mm_crc32_u8(unsigned int, unsigned
char)’:
tools/qhash.cpp:803:1: internal compiler error: Segmentation fault
 }
 ^
0xbbee0f crash_signal
        ../../gcc/gcc/toplev.c:340
0x72516d c_tree_chain_next
        ../../gcc/gcc/c-family/c-common.h:1230
0x72516d gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:159
0x9b44e5 ggc_mark_root_tab
        ../../gcc/gcc/ggc-common.c:133
0x9b49a0 ggc_mark_roots()
        ../../gcc/gcc/ggc-common.c:152
0x7e72f4 ggc_collect()
        ../../gcc/gcc/ggc-page.c:2173
Please submit a full bug report,
with preprocessed source if appropriate.

preprocessed source has at the beginning:
#pragma GCC pch_preprocess "./.pch/Qt5Core.gch/c++"
That file size is 63Mb.

gdb shows:
process 25582 is executing new program:
/var/tmp/gcc_test/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/cc1plus
tools/qhash.cpp: In function ‘unsigned int _mm_crc32_u8(unsigned int, unsigned
char)’:
tools/qhash.cpp:803:1: internal compiler error: in
tree_node_structure_for_code, at tree.c:407
 }
 ^
0xdf8c3b tree_node_structure_for_code
        ../../gcc/gcc/tree.c:407
0xdf8c3b tree_node_structure(tree_node const*)
        ../../gcc/gcc/tree.c:3271
0x7254ff gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:165
0x9b44e5 ggc_mark_root_tab
        ../../gcc/gcc/ggc-common.c:133
0x9b49a0 ggc_mark_roots()
        ../../gcc/gcc/ggc-common.c:152
0x7e72f4 ggc_collect()
        ../../gcc/gcc/ggc-page.c:2173
Please submit a full bug report,
with preprocessed source if appropriate.

valgrind shows:
==25604== Invalid read of size 1
==25604==    at 0x72516D: c_tree_chain_next (c-common.h:1230)
==25604==    by 0x72516D: gt_ggc_mx_lang_tree_node(void*) (gt-cp-tree.h:159)
==25604==    by 0x9B44E5: ggc_mark_root_tab(ggc_root_tab const*)
(ggc-common.c:133)
==25604==    by 0x9B49A0: ggc_mark_roots() (ggc-common.c:152)
==25604==    by 0x7E72F4: ggc_collect() (ggc-page.c:2173)
==25604==    by 0xB0728A: execute_one_pass(opt_pass*) (passes.c:2191)
==25604==    by 0xB07715: execute_pass_list_1(opt_pass*) (passes.c:2203)
==25604==    by 0xB07768: execute_pass_list(function*, opt_pass*)
(passes.c:2214)
==25604==    by 0xB05F84: do_per_function_toporder(void (*)(function*, void*),
void*) (passes.c:1521)
==25604==    by 0xB07D46: execute_ipa_pass_list(opt_pass*) (passes.c:2548)
==25604==    by 0x866317: ipa_passes (cgraphunit.c:2017)
==25604==    by 0x866317: symbol_table::compile() (cgraphunit.c:2136)
==25604==    by 0x8680F7: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2288)
==25604==    by 0x650BBA: cp_write_global_declarations() (decl2.c:4666)
==25604==  Address 0x1c10018 is not stack'd, malloc'd or (recently) free'd
==25604== 
tools/qhash.cpp: In function ‘unsigned int _mm_crc32_u8(unsigned int, unsigned
char)’:
tools/qhash.cpp:803:1: internal compiler error: Segmentation fault

Without "-g" the issue goes away.
Not sure how to reduce this issue further. Hints welcome.

Reply via email to