Project

General

Profile

Bug #1087

[mips][gcc-5][windows] ICE when building C++ code

Added by Dmitry Moskalchuk almost 4 years ago. Updated about 3 years ago.

Status:
Open
Priority:
High
Category:
toolchain
Target version:
Start date:
10/05/2015
Due date:
% Done:

0%

Estimated time:
CPU Architecture:
mips
Host OS:
Windows
Toolchain:
gcc-5
Android version:
CrystaX Version:

Description

C:/tmp/crystax-ndk/ndk/toolchains/mipsel-linux-android-5/prebuilt/windows/bin/mipsel-linux-android-g++ -MMD -MP -MF ./obj/local/mips/objs/stlport_shared/src/dll_main.o.d -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -no-canonical-prefixes -fno-exceptions -fno-rtti -O2 -g -DNDEBUG -fomit-frame-pointer -funswitch-loops -finline-limit=300 -IC:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/stlport -IC:/tmp/crystax-ndk/ndk/sources/cxx-stl//gabi++/include -IC:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport -DANDROID -D_GNU_SOURCE -Wa,--noexecstack -Wformat -Werror=format-security -fuse-cxa-atexit -frtti -fexceptions -std=gnu++11 -c -IC:/tmp/crystax-ndk/ndk/sources/crystax/include -IC:/tmp/crystax-ndk/ndk/platforms/android-9/arch-mips/usr/include C:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/src/dll_main.cpp -o ./obj/local/mips/objs/stlport_shared/src/dll_main.o
In file included from C:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/stlport/stl/_string.h:78:0,
                 from C:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/stlport/string:29,
                 from C:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/src/dll_main.cpp:49:
C:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/stlport/stl/_string_base.h: In member function 'void std::priv::_String_base<_Tp, _Alloc>::_M_deallocate_block() [with _Tp = char; _Alloc = std::allocator<char>]':
C:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/stlport/stl/_string_base.h:102:3: internal compiler error: Segmentation fault
   }
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://tracker.crystax.net/projects/ndk> for instructions.

mips-gcc-bug.tar.xz (83.5 KB) Dmitry Moskalchuk, 12/29/2015 02:01 PM

History

#1 Updated by Dmitry Moskalchuk over 3 years ago

  • Blocks Task #1049: Make gcc-5 default toolchain added

#2 Updated by Dmitry Moskalchuk over 3 years ago

  • Target version changed from 10.3.0 to 11.0.0

#3 Updated by Dmitry Moskalchuk over 3 years ago

  • Target version changed from 11.0.0 to 10.3.0

#4 Updated by Dmitry Moskalchuk over 3 years ago

  • Status changed from Open to In Progress

#5 Updated by Dmitry Moskalchuk over 3 years ago

  • Status changed from In Progress to Open
  • Target version changed from 10.3.0 to 11.0.0

This crash happens only when running NDK tests on Window machine through SSH session (Cygwin). When running in typical Windows environment (either in cmd console or in cygwin/mingw shell), it doesn't crash.

It seems like a problem with different environment. It's still the bug of GCC, but obviously it's not so critical due to very specific reproduce case, so moving it to the next (10.4.0) release.

For the record: crash happens somewhere inside gcc's core handling instructions reordering. This is exact place of crash:

FOR_BB_INSNS_REVERSE (bb, insn)
    {
      df_insn_info *insn_info = DF_INSN_INFO_GET (insn);   //<== here
      df_mw_hardreg *mw;
      int debug_insn;

#6 Updated by Dmitry Moskalchuk over 3 years ago

  • Blocks deleted (Task #1049: Make gcc-5 default toolchain)

#7 Updated by Dmitry Moskalchuk over 3 years ago

Here is clear way to reproduce the bug:

  • Download attached archive mips-gcc-bug.tar.xz
  • Unpack and copy its content on Windows machine with Cygwin installed
  • Edit run.sh to point NDK to proper place
  • Run run.sh in Cygwin shell

Several first runs will be successful, but sooner or later it will crash:

==== #24
GNU C++11 (GCC) version 5.3 20151204 (mipsel-linux-android)
        compiled by GNU C version 4.8.3, GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++11 (GCC) version 5.3 20151204 (mipsel-linux-android)
        compiled by GNU C version 4.8.3, GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 8781bacb02a5a1c91d9cecb60b1329d3
In file included from C:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/stlport/stl/_list.h:691:0,
                 from C:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/stlport/list:36,
                 from .//unit/ptrspec_test.cpp:2:
C:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/stlport/stl/_list.c: In function 'void std::priv::_S_merge(std::list<_Tp, _Alloc>&, std::list<_Tp, _Alloc>&, _StrictWeakOrdering) [with _Tp = const volatile int*; _Alloc = std::allocator<const volatile int*>; _StrictWeakOrdering = std::less<const volatile int*>]':
C:/tmp/crystax-ndk/ndk/sources/cxx-stl/stlport/stlport/stl/_list.c:203:1: internal compiler error: Segmentation fault
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://tracker.crystax.net/projects/ndk> for instructions.

#8 Updated by Dmitry Moskalchuk about 3 years ago

  • Subject changed from [mips][gcc-5][windows] ICE when re-building STLport to [mips][gcc-5][windows] ICE when building C++ code
  • Description updated (diff)

Also available in: Atom PDF