public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314
@ 2023-09-12 18:41 hiraditya at msn dot com
  2023-09-12 18:44 ` [Bug tree-optimization/111393] " hiraditya at msn dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: hiraditya at msn dot com @ 2023-09-12 18:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111393
           Summary: ICE: Segmentation fault src/gcc/toplev.cc:314
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hiraditya at msn dot com
  Target Milestone: ---

riscv64-gnu-linux (version Debian 13.1) building llvm-project
(GlobalModuleIndex.cpp) crashed with ICE.

src/gcc/toplev.cc:314
profile_count::operator==(proile_count const&) const
     ../../src/gcc/profile-count.h:865
profile_count::apply_probability(proile_probability) const
     ../../src/gcc/profile-count.h:1104

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
@ 2023-09-12 18:44 ` hiraditya at msn dot com
  2023-09-12 19:00 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hiraditya at msn dot com @ 2023-09-12 18:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from AK <hiraditya at msn dot com> ---
oot/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/build# ninja clang
check-clang
[100/845] Building CXX object
tools/clang/lib/Serialization/CMakeFiles/obj.clangSerialization.dir/GlobalModuleIndex.cpp.o
FAILED:
tools/clang/lib/Serialization/CMakeFiles/obj.clangSerialization.dir/GlobalModuleIndex.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE
-D_LIBCPP_ENABLE_HARDENED_MODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS
-I/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/build/tools/clang/lib/Serialization
-I/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/clang/lib/Serialization
-I/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/clang/include
-I/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/build/tools/clang/include
-I/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/build/include
-I/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/llvm/include
-fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time
-fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long
-Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull
-Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment
-Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color
-ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual
-fno-strict-aliasing  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG
-std=c++17 -MD -MT
tools/clang/lib/Serialization/CMakeFiles/obj.clangSerialization.dir/GlobalModuleIndex.cpp.o
-MF
tools/clang/lib/Serialization/CMakeFiles/obj.clangSerialization.dir/GlobalModuleIndex.cpp.o.d
-o
tools/clang/lib/Serialization/CMakeFiles/obj.clangSerialization.dir/GlobalModuleIndex.cpp.o
-c
/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/clang/lib/Serialization/GlobalModuleIndex.cpp
In file included from
/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/llvm/include/llvm/ADT/DenseMapInfo.h:20,
                 from
/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/llvm/include/llvm/ADT/DenseMap.h:17,
                 from
/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/clang/include/clang/Serialization/GlobalModuleIndex.h:18,
                 from
/media/root/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/clang/lib/Serialization/GlobalModuleIndex.cpp:13:
/usr/include/c++/13/tuple: In instantiation of ‘struct std::_Tuple_impl<0,
clang::ModuleFileExtensionReader*,
std::default_delete<clang::ModuleFileExtensionReader> >’:
/usr/include/c++/13/tuple:1232:11:   required from ‘class
std::tuple<clang::ModuleFileExtensionReader*,
std::default_delete<clang::ModuleFileExtensionReader> >’
/usr/include/c++/13/bits/unique_ptr.h:232:27:   required from ‘class
std::__uniq_ptr_impl<clang::ModuleFileExtensionReader,
std::default_delete<clang::ModuleFileExtensionReader> >’
/usr/include/c++/13/bits/unique_ptr.h:239:12:   required from ‘struct
std::__uniq_ptr_data<clang::ModuleFileExtensionReader,
std::default_delete<clang::ModuleFileExtensionReader>, true, true>’
/usr/include/c++/13/bits/unique_ptr.h:283:33:   required from ‘class
std::unique_ptr<clang::ModuleFileExtensionReader>’
/usr/include/c++/13/bits/stl_vector.h:367:35:   required from
‘std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp =
std::unique_ptr<clang::ModuleFileExtensionReader>; _Alloc =
std::allocator<std::unique_ptr<clang::ModuleFileExtensionReader> >]’
/usr/include/c++/13/bits/stl_vector.h:528:7:   required from here
/usr/include/c++/13/tuple:269:7: internal compiler error: Segmentation fault
  269 |       _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t);
}
      |       ^~~~~~~
0x85d7c5 crash_signal
        ../../src/gcc/toplev.cc:314
0xa0d5e0 profile_count::operator==(profile_count const&) const
        ../../src/gcc/profile-count.h:865
0xa0d5e0 profile_count::apply_probability(profile_probability) const
        ../../src/gcc/profile-count.h:1104
0xa0d5e0 edge_def::count() const
        ../../src/gcc/basic-block.h:639
0xa0d5e0 eliminate_tail_call
        ../../src/gcc/tree-tailcall.cc:982
0xa0d5e0 optimize_tail_call
        ../../src/gcc/tree-tailcall.cc:1053
0xa0d5e0 tree_optimize_tail_calls_1
        ../../src/gcc/tree-tailcall.cc:1193
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-13/README.Bugs> for instructions.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
  2023-09-12 18:44 ` [Bug tree-optimization/111393] " hiraditya at msn dot com
@ 2023-09-12 19:00 ` pinskia at gcc dot gnu.org
  2023-09-12 21:34 ` hiraditya at msn dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-12 19:00 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2023-09-12
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you provide the preprocessed source?

Also provide the output of `gcc -v`?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
  2023-09-12 18:44 ` [Bug tree-optimization/111393] " hiraditya at msn dot com
  2023-09-12 19:00 ` pinskia at gcc dot gnu.org
@ 2023-09-12 21:34 ` hiraditya at msn dot com
  2023-09-12 21:42 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hiraditya at msn dot com @ 2023-09-12 21:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from AK <hiraditya at msn dot com> ---
gcc -v

COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/riscv64-linux-gnu/13/lto-wrapper
Target: riscv64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 13.1.0-6'
--with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr
--with-gcc-major-version-only --program-suffix=-13
--program-prefix=riscv64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-libitm --disable-libquadmath
--disable-libquadmath-support --enable-plugin --enable-default-pie
--with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
--disable-werror --disable-multilib --with-arch=rv64gc --with-abi=lp64d
--enable-checking=release --build=riscv64-linux-gnu --host=riscv64-linux-gnu
--target=riscv64-linux-gnu --with-build-config=bootstrap-lto-lean
--enable-link-serialization=32
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.1.0 (Debian 13.1.0-6) 
root@lpi4a:/media/root/d2fc9f48-c166-4a9

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
                   ` (2 preceding siblings ...)
  2023-09-12 21:34 ` hiraditya at msn dot com
@ 2023-09-12 21:42 ` pinskia at gcc dot gnu.org
  2023-09-12 22:03 ` hiraditya at msn dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-12 21:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Did you first report this to Debian also:
See <file:///usr/share/doc/gcc-13/README.Bugs> for instructions.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
                   ` (3 preceding siblings ...)
  2023-09-12 21:42 ` pinskia at gcc dot gnu.org
@ 2023-09-12 22:03 ` hiraditya at msn dot com
  2023-09-12 22:07 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hiraditya at msn dot com @ 2023-09-12 22:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from AK <hiraditya at msn dot com> ---
Created attachment 55890
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55890&action=edit
GlobalModuleIndex.cpp preprocessed files

Everytime the crash is in a different file. it could be just because of memory
issues.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
                   ` (4 preceding siblings ...)
  2023-09-12 22:03 ` hiraditya at msn dot com
@ 2023-09-12 22:07 ` pinskia at gcc dot gnu.org
  2023-09-13  7:04 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-12 22:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to AK from comment #5)
> Created attachment 55890 [details]
> GlobalModuleIndex.cpp preprocessed files
> 
> Everytime the crash is in a different file. it could be just because of
> memory issues.

this does seem like a HW issue. Are you sure you have a decent RISCV machine
without any memory issues?

I suspect ninja is building with all of the cores which pushes the memory usage
high.

Maybe lower the clock speed of the CPU you are using.
Try with a cross compile also.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
                   ` (5 preceding siblings ...)
  2023-09-12 22:07 ` pinskia at gcc dot gnu.org
@ 2023-09-13  7:04 ` rguenth at gcc dot gnu.org
  2023-09-13 15:59 ` hiraditya at msn dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-09-13  7:04 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |13.1.0

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
You might also want to update the compiler, GCC 13.1.0 is old, 13.2.0 exists
for quite a while.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
                   ` (6 preceding siblings ...)
  2023-09-13  7:04 ` rguenth at gcc dot gnu.org
@ 2023-09-13 15:59 ` hiraditya at msn dot com
  2023-09-14 18:55 ` hiraditya at msn dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hiraditya at msn dot com @ 2023-09-13 15:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from AK <hiraditya at msn dot com> ---

> this does seem like a HW issue. Are you sure you have a decent RISCV machine without any memory issues?
> I suspect ninja is building with all of the cores which pushes the memory usage high.

possible. I have the https://sipeed.com/licheepi4a (licheepi 4a board)


> Maybe lower the clock speed of the CPU you are using.

will do. thanks

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
                   ` (7 preceding siblings ...)
  2023-09-13 15:59 ` hiraditya at msn dot com
@ 2023-09-14 18:55 ` hiraditya at msn dot com
  2023-09-14 19:03 ` pinskia at gcc dot gnu.org
  2023-09-15  7:33 ` xry111 at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: hiraditya at msn dot com @ 2023-09-14 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from AK <hiraditya at msn dot com> ---
i think it is okay to close this bug as this doesn't seem to be related to gcc.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
                   ` (8 preceding siblings ...)
  2023-09-14 18:55 ` hiraditya at msn dot com
@ 2023-09-14 19:03 ` pinskia at gcc dot gnu.org
  2023-09-15  7:33 ` xry111 at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-14 19:03 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Invalid as it is hw issue it seems

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/111393] ICE: Segmentation fault src/gcc/toplev.cc:314
  2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
                   ` (9 preceding siblings ...)
  2023-09-14 19:03 ` pinskia at gcc dot gnu.org
@ 2023-09-15  7:33 ` xry111 at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: xry111 at gcc dot gnu.org @ 2023-09-15  7:33 UTC (permalink / raw)
  To: gcc-bugs

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

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xry111 at gcc dot gnu.org

--- Comment #11 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Read https://www.bitwizard.nl/sig11/.

Though it was written for ancient 386 systems I find much of its points are
still valid today for modern x86 or non-x86 systems.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-09-15  7:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12 18:41 [Bug tree-optimization/111393] New: ICE: Segmentation fault src/gcc/toplev.cc:314 hiraditya at msn dot com
2023-09-12 18:44 ` [Bug tree-optimization/111393] " hiraditya at msn dot com
2023-09-12 19:00 ` pinskia at gcc dot gnu.org
2023-09-12 21:34 ` hiraditya at msn dot com
2023-09-12 21:42 ` pinskia at gcc dot gnu.org
2023-09-12 22:03 ` hiraditya at msn dot com
2023-09-12 22:07 ` pinskia at gcc dot gnu.org
2023-09-13  7:04 ` rguenth at gcc dot gnu.org
2023-09-13 15:59 ` hiraditya at msn dot com
2023-09-14 18:55 ` hiraditya at msn dot com
2023-09-14 19:03 ` pinskia at gcc dot gnu.org
2023-09-15  7:33 ` xry111 at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).