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

--- Comment #2 from Daniel Fruzynski <bugzi...@poradnik-webmastera.com> ---
I was able to reproduce crash using MinGW crosscompiler build for CentOS 7,
configured in following way:

../gcc-7.4.0/configure --prefix=/root/gcc-7.4.0-mingw64
--build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --with-gnu-as
--with-gnu-ld --verbose --without-newlib --disable-multilib --disable-plugin
--with-system-zlib --disable-nls --without-included-gettext
--disable-win32-registry --enable-languages=c,c++ --enable-threads=posix
--enable-libgomp --target=x86_64-w64-mingw32
--with-sysroot=/usr/x86_64-w64-mingw32/sys-root
--with-gxx-include-dir=/usr/x86_64-w64-mingw32/sys-root/mingw/include/c++
--with-as=/usr/bin/x86_64-w64-mingw32-as
--with-ld=/usr/bin/x86_64-w64-mingw32-ld

Required prerequisites were downloaded using script from contrib dir. I also
have installed MinGW toolchain from EPEL repository, to get sysroot and other
things needed for build.

With this crosscompiler I got following crash report:

[out]
RakeSearchOpenCL.cpp: In member function 'bool RakeSearchOpenCL::init(int,
char**)':
RakeSearchOpenCL.cpp:99:1: internal compiler error: Segmentation fault
 }
 ^
0x9cd06f crash_signal
        ../../gcc-7.4.0/gcc/toplev.c:337
0x62ab33 lookup_page_table_entry
        ../../gcc-7.4.0/gcc/ggc-page.c:630
0x62ab33 ggc_set_mark(void const*)
        ../../gcc-7.4.0/gcc/ggc-page.c:1527
0x57bf97 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:133
0x57d337 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:523
0x59d6c3 gt_ggc_mx_cxx_binding(void*)
        ./gt-cp-name-lookup.h:60
0x57c1b7 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:648
0x57cf06 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:275
0x57c920 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:466
0x57c83b gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:440
0x57ce6c gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:264
0x57d337 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:523
0x57d329 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:522
0x57d329 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:522
0x57d353 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:525
0x57cc69 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:356
0x57ce96 gt_ggc_mx_lang_tree_node(void*)
        ./gt-cp-tree.h:267
0x7d78ce gt_ggc_mx_gimple(void*)
        /root/gcc-7.4.0-mingw64-build/obj/gcc/gtype-desc.c:1316
0x7d5909 gt_ggc_mx_basic_block_def(void*)
        /root/gcc-7.4.0-mingw64-build/obj/gcc/gtype-desc.c:1440
0x7d7565 gt_ggc_mx_gimple(void*)
        /root/gcc-7.4.0-mingw64-build/obj/gcc/gtype-desc.c:1319
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
[/out]

I tried to debut it using gdb, and got this callstack:

[out]
Program received signal SIGSEGV, Segmentation fault.
[Switching to process 18062]
lookup_page_table_entry (p=p@entry=0x157cf6a4) at
../../gcc-7.4.0/gcc/ggc-page.c:630
630       while (table->high_bits != high_bits)
Missing separate debuginfos, use: debuginfo-install
glibc-2.17-260.el7_6.5.x86_64
(gdb) i lo
L2 = <optimized out>
high_bits = 0
base = <optimized out>
L1 = <optimized out>
table = 0x0
(gdb) bt
#0  lookup_page_table_entry (p=p@entry=0x157cf6a4) at
../../gcc-7.4.0/gcc/ggc-page.c:630
#1  ggc_set_mark (p=p@entry=0x157cf6a4) at ../../gcc-7.4.0/gcc/ggc-page.c:1527
#2  0x000000000057bf98 in gt_ggc_mx_lang_tree_node (x_p=0x157cf6a4) at
./gt-cp-tree.h:133
#3  0x000000000057d338 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:523
#4  0x000000000059d6c4 in gt_ggc_mx_cxx_binding (x_p=0x7fffe8d61550) at
./gt-cp-name-lookup.h:60
#5  0x000000000057c1b8 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:648
#6  0x000000000057cf07 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:275
#7  0x000000000057c921 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:466
#8  0x000000000057c83c in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:440
#9  0x000000000057ce6d in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:264
#10 0x000000000057d338 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:523
#11 0x000000000057d32a in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:522
#12 0x000000000057d32a in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:522
#13 0x000000000057d354 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:525
#14 0x000000000057cc6a in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:356
#15 0x000000000057ce97 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:267
#16 0x00000000007d78cf in gt_ggc_mx_gimple (x_p=<optimized out>) at
gtype-desc.c:1316
#17 0x00000000007d590a in gt_ggc_mx_basic_block_def (x_p=<optimized out>) at
gtype-desc.c:1440
#18 0x00000000007d7566 in gt_ggc_mx_gimple (x_p=<optimized out>) at
gtype-desc.c:1319
#19 0x00000000007d98d2 in gt_ggc_mx_cgraph_edge (x_p=<optimized out>) at
gtype-desc.c:2608
#20 0x00000000007d93ee in gt_ggc_mx_symtab_node (x_p=<optimized out>) at
gtype-desc.c:1799
#21 0x000000000057ccc1 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:362
#22 0x000000000057cd05 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:366
#23 0x00000000007d37c7 in gt_ggc_mx<tree_node*> (v=<optimized out>) at
../../gcc-7.4.0/gcc/vec.h:1110
#24 gt_ggc_mx_vec_tree_va_gc_ (x_p=0x7fffe8c2b360) at gtype-desc.c:1737
#25 0x000000000057bee5 in gt_ggc_mx_lang_type (x_p=0x7fffe8c415f0) at
./gt-cp-tree.h:40
#26 0x000000000057c910 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:465
#27 0x000000000057d674 in gt_ggc_mx_lang_tree_node (x_p=<optimized out>) at
./gt-cp-tree.h:337

............ tons of other stack frames here ..................

#1173 0x0000000000691119 in cgraph_node::expand (this=0x7fffe2226730) at
../../gcc-7.4.0/gcc/cgraphunit.c:2042
#1174 0x0000000000692634 in expand_all_functions () at
../../gcc-7.4.0/gcc/cgraphunit.c:2178
#1175 symbol_table::compile (this=this@entry=0x7ffff72fb100) at
../../gcc-7.4.0/gcc/cgraphunit.c:2536
---Type <return> to continue, or q <return> to quit---
#1176 0x0000000000693e2c in symbol_table::finalize_compilation_unit
(this=0x7ffff72fb100) at ../../gcc-7.4.0/gcc/cgraphunit.c:2626
#1177 0x00000000009cd2df in compile_file () at ../../gcc-7.4.0/gcc/toplev.c:492
#1178 0x0000000000476002 in do_compile () at ../../gcc-7.4.0/gcc/toplev.c:2003
#1179 toplev::main (this=this@entry=0x7fffffffe1a0, argc=argc@entry=23,
argv=argv@entry=0x7fffffffe2a8)
    at ../../gcc-7.4.0/gcc/toplev.c:2138
#1180 0x0000000000478047 in main (argc=23, argv=0x7fffffffe2a8) at
../../gcc-7.4.0/gcc/main.c:39
[/out]

Reply via email to