This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/78553] New: GCC 5.3.0 and 5.4.0 segfault during bootstrap when --enable-vtable-verify is enabled on PowerPC musl


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

            Bug ID: 78553
           Summary: GCC 5.3.0 and 5.4.0 segfault during bootstrap when
                    --enable-vtable-verify is enabled on PowerPC musl
           Product: gcc
           Version: 5.4.0
               URL: https://bugs.gentoo.org/show_bug.cgi?id=588664
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: awilfox at adelielinux dot org
  Target Milestone: ---
            Target: powerpc-linux-musl

Created attachment 40170
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40170&action=edit
Each crash seen during make -j4 of GCC 5.4.0

I have been able to confirm that passing --enable-vtable-verify to ./configure
causes these GCC versions to segfault during the build of libstdc++-v3 on
PowerPC targets:

5.3.0, no patches
5.3.0, Gentoo patches
5.3.0, musl-cross-make patches
5.4.0, no patches
5.4.0, Adélie patches
5.4.0, Gentoo patches
5.4.0, musl-cross-make patches


In file included from
/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/gcc-5.4.0/libstdc++-v3/src/c++98/complex_io.cc:25:0:
/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/build/powerpc-foxkit-linux-musl/libstdc++-v3/include/complex:
In function ‘std::basic_ostream<_CharT, _Traits>&
std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::complex<_Tp>&)
[with _Tp = long double; _CharT = wchar_t; _Traits =
std::char_traits<wchar_t>]’:
/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/build/powerpc-foxkit-linux-musl/libstdc++-v3/include/complex:526:5:
internal compiler error: Segmentation fault
     operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
     ^


Disabling --enable-vtable-verify allows the build to complete successfully. 
This happens to me on PowerPC and PowerPC64 glibc hosts
(powerpc{,64}-linux-gnu), but appears to also occur on x86_64-linux-gnu targets
per the Gentoo bug in the URL field.

Backtrace follows from my PowerPC64 system.  I no longer have the .ii file but
I can recreate it if it is needed (it takes about 40 minutes to get to the
failure point).

Starting program:
/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/build/gcc/xgcc
-shared-libgcc
-B/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/build/./gcc
-nostdinc++
-L/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/build/powerpc-foxkit-linux-musl/libstdc++-v3/src
-L/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/build/powerpc-foxkit-linux-musl/libstdc++-v3/src/.libs
-L/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/build/powerpc-foxkit-linux-musl/libstdc++-v3/libsupc++/.libs
-B/usr/powerpc-foxkit-linux-musl/bin/ -B/usr/powerpc-foxkit-linux-musl/lib/
-isystem /usr/powerpc-foxkit-linux-musl/include -isystem
/usr/powerpc-foxkit-linux-musl/sys-include
-I/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/gcc-5.4.0/libstdc++-v3/../libgcc
-I/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/build/powerpc-foxkit-linux-musl/libstdc++-v3/include/powerpc-foxkit-linux-musl
-I/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/build/powerpc-foxkit-linux-musl/libstdc++-v3/include
-I/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/gcc-5.4.0/libstdc++-v3/libsupc++
-D_GLIBCXX_SHARED -fno-implicit-templates -fvtable-verify=std
-Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end -Wall -Wextra
-Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -frandom-seed=complex_io.lo -g -O2
-D_GNU_SOURCE -c
/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/gcc-5.4.0/libstdc++-v3/src/c++98/complex_io.cc
 -fPIC -DPIC -D_GLIBCXX_SHARED -o complex_io.o
[New process 11748]
process 11748 is executing new program:
/var/tmp/portage/cross-powerpc-foxkit-linux-musl/gcc-5.4.0/work/build/gcc/cc1plus

Thread 2.1 "cc1plus" received signal SIGSEGV, Segmentation fault.
[Switching to process 11748]
0x000000001040f2d4 in .symtab_node::ultimate_alias_target(availability*) ()
(gdb) bt
#0  0x000000001040f2d4 in .symtab_node::ultimate_alias_target(availability*) ()
#1  0x000000001063adbc in .cgraph_node::ultimate_alias_target(availability*) ()
#2  0x00000000110ed540 in .call_ABI_of_interest(tree_node*) ()
#3  0x00000000110ed8f4 in .init_cumulative_args(rs6000_args*, tree_node*,
rtx_def*, int, int, int, tree_node*, machine_mode) ()
#4  0x00000000105c239c in .expand_call(tree_node*, rtx_def*, int) ()
#5  0x000000001079ea20 in .expand_expr_real_1(tree_node*, rtx_def*,
machine_mode, expand_modifier, rtx_def**, bool) ()
#6  0x00000000107949a4 in .expand_expr_real(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool) ()
#7  0x000000001078c0e0 in .store_expr_with_bounds(tree_node*, rtx_def*, int,
bool, tree_node*) ()
#8  0x000000001078b134 in .expand_assignment(tree_node*, tree_node*, bool) ()
#9  0x00000000105ddff0 in .expand_call_stmt(gcall*) ()
#10 0x00000000105e1264 in .expand_gimple_stmt_1(gimple_statement_base*) ()
#11 0x00000000105e1a1c in .expand_gimple_stmt(gimple_statement_base*) ()
#12 0x00000000105e9218 in .expand_gimple_basic_block(basic_block_def*, bool) ()
#13 0x00000000105eb314 in .(anonymous
namespace)::pass_expand::execute(function*) ()
#14 0x0000000010b2ae40 in .execute_one_pass(opt_pass*) ()
#15 0x0000000010b2b1f0 in .execute_pass_list_1(opt_pass*) ()
#16 0x0000000010b2b298 in .execute_pass_list(function*, opt_pass*) ()
#17 0x0000000010647db0 in .cgraph_node::expand() ()
#18 0x000000001064840c in .expand_all_functions() ()
#19 0x0000000010649430 in .symbol_table::compile() ()
#20 0x0000000010649594 in .symbol_table::finalize_compilation_unit() ()
#21 0x000000001036192c in .cp_write_global_declarations() ()
#22 0x0000000010c8f980 in .compile_file() ()
#23 0x0000000010c939c4 in .do_compile() ()
#24 0x0000000010c93de0 in .toplev::main(int, char**) ()
#25 0x000000001160234c in .main ()

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]