public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/113357] New: [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c
@ 2024-01-12 17:01 mikpelinux at gmail dot com
  2024-01-12 17:11 ` [Bug target/113357] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: mikpelinux at gmail dot com @ 2024-01-12 17:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113357
           Summary: [14 regression] m68k-linux bootstrap failure in stage2
                    due to segfault compiling unwind-dw2.c
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mikpelinux at gmail dot com
  Target Milestone: ---

gcc-14 native(*) bootstrap on m68k-linux-gnu fails during stage2 as follows:

ranlib  libgcov.a
/mnt/scratch/objdir14/./gcc/xgcc -B/mnt/scratch/objdir14/./gcc/
-B/mnt/scratch/install14/m68k-unknown-linux-gnu/bin/
-B/mnt/scratch/install14/m68k-unknown-linux-gnu/lib/ -isystem
/mnt/scratch/install14/m68k-unknown-linux-gnu/include -isystem
/mnt/scratch/install14/m68k-unknown-linux-gnu/sys-include   -fno-checking -g
-O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include   -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  
-fPIC -I. -I. -I../.././gcc -I/mnt/scratch/gcc-14-20240107/libgcc
-I/mnt/scratch/gcc-14-20240107/libgcc/.
-I/mnt/scratch/gcc-14-20240107/libgcc/../gcc
-I/mnt/scratch/gcc-14-20240107/libgcc/../include  -DHAVE_CC_TLS   -o
unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c
/mnt/scratch/gcc-14-20240107/libgcc/unwind-dw2.c -fvisibility=hidden
-DHIDE_EXPORTS
during GIMPLE pass: switchlower
/mnt/scratch/gcc-14-20240107/libgcc/unwind-dw2.c: In function
'execute_stack_op':
/mnt/scratch/gcc-14-20240107/libgcc/unwind-dw2.c:524:1: internal compiler
error: Segmentation fault
  524 | execute_stack_op (const unsigned char *op_ptr, const unsigned char
*op_end,
      | ^~~~~~~~~~~~~~~~
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
make[3]: *** [/mnt/scratch/gcc-14-20240107/libgcc/shared-object.mk:14:
unwind-dw2.o] Error 1
make[3]: Leaving directory
'/mnt/scratch/objdir14/m68k-unknown-linux-gnu/libgcc'
make[2]: *** [Makefile:17845: all-stage2-target-libgcc] Error 2
make[2]: Leaving directory '/mnt/scratch/objdir14'
make[1]: *** [Makefile:21317: stage2-bubble] Error 2
make[1]: Leaving directory '/mnt/scratch/objdir14'
make: *** [Makefile:21513: bootstrap] Error 2

This has been going on since 20231022, 20231015 was good. gcc-13 is also good.

Starting a git bisect now, but it'll take at least several weeks to get a
result.

(*) M1 mini running Aranym running m68k-linux-gnu full-system emulation.

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

* [Bug target/113357] [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c
  2024-01-12 17:01 [Bug bootstrap/113357] New: [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c mikpelinux at gmail dot com
@ 2024-01-12 17:11 ` pinskia at gcc dot gnu.org
  2024-01-12 17:23 ` mikpelinux at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-12 17:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Host|                            |m68k-linux-gnu
          Component|bootstrap                   |target
   Target Milestone|---                         |14.0
             Target|                            |m68k-linux-gnu
              Build|                            |m68k-linux-gnu
           Keywords|                            |build, ice-on-valid-code,
                   |                            |wrong-code

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you provide the exact configure options so someone might be able to
reproduce it too?

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

* [Bug target/113357] [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c
  2024-01-12 17:01 [Bug bootstrap/113357] New: [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c mikpelinux at gmail dot com
  2024-01-12 17:11 ` [Bug target/113357] " pinskia at gcc dot gnu.org
@ 2024-01-12 17:23 ` mikpelinux at gmail dot com
  2024-01-27 17:27 ` mikpelinux at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mikpelinux at gmail dot com @ 2024-01-12 17:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Mikael Pettersson <mikpelinux at gmail dot com> ---
/mnt/scratch/gcc-14-20240107/configure --prefix=/mnt/scratch/install14
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu --disable-sjlj-exceptions
--disable-plugin --disable-lto --disable-multilib --disable-libgomp
--enable-initfini-array --enable-languages=c,c++

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

* [Bug target/113357] [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c
  2024-01-12 17:01 [Bug bootstrap/113357] New: [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c mikpelinux at gmail dot com
  2024-01-12 17:11 ` [Bug target/113357] " pinskia at gcc dot gnu.org
  2024-01-12 17:23 ` mikpelinux at gmail dot com
@ 2024-01-27 17:27 ` mikpelinux at gmail dot com
  2024-01-31 14:11 ` mikpelinux at gmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mikpelinux at gmail dot com @ 2024-01-27 17:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Mikael Pettersson <mikpelinux at gmail dot com> ---
git bisect identified the following as the start of this error:

# new: [04c9cf5c786b94fbe3f6f21f06cae73a7575ff7a] Implement new RTL
optimizations pass: fold-mem-offsets

Note the error still reproduced as of 2024-01-07 so wasn't fixed by PR111601.

(Technically my bisect has one more commit to test, the one immediately before
the above, but that one only updates gcc/d/ so cannot have any impact to my
bootstraps.)

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

* [Bug target/113357] [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c
  2024-01-12 17:01 [Bug bootstrap/113357] New: [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c mikpelinux at gmail dot com
                   ` (2 preceding siblings ...)
  2024-01-27 17:27 ` mikpelinux at gmail dot com
@ 2024-01-31 14:11 ` mikpelinux at gmail dot com
  2024-03-22 13:55 ` [Bug target/113357] [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c since r14-4664-g04c9cf5c786b94 law at gcc dot gnu.org
  2024-05-07  7:43 ` [Bug target/113357] [14/15 " rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: mikpelinux at gmail dot com @ 2024-01-31 14:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Mikael Pettersson <mikpelinux at gmail dot com> ---
Confirmed:

04c9cf5c786b94fbe3f6f21f06cae73a7575ff7a is the first new commit
commit 04c9cf5c786b94fbe3f6f21f06cae73a7575ff7a
Author: Manolis Tsamis <manolis.tsamis@vrull.eu>
Date:   Mon Oct 16 13:08:12 2023 -0600

    Implement new RTL optimizations pass: fold-mem-offsets

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

* [Bug target/113357] [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c since r14-4664-g04c9cf5c786b94
  2024-01-12 17:01 [Bug bootstrap/113357] New: [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c mikpelinux at gmail dot com
                   ` (3 preceding siblings ...)
  2024-01-31 14:11 ` mikpelinux at gmail dot com
@ 2024-03-22 13:55 ` law at gcc dot gnu.org
  2024-05-07  7:43 ` [Bug target/113357] [14/15 " rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-22 13:55 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

--- Comment #5 from Jeffrey A. Law <law at gcc dot gnu.org> ---
So given my bootstraps (qemu) are working the most likely scenarios are either
a difference in the emulators or a difference in the configure setup.

The first thing I would suggest would be to put the stage2 compiler under a
debugger and find out why it faulted.  That might help with understanding the
problem.  ie, are we segfaulting because we dereferenced a NULL pointer, or
perhaps faulting because we did an unaligned access, or whatever.

The next thing I would suggest would be extracting the .i file and confirming
you  can feed that to the stage2 cc1 and see the fault.  Assuming you can, then
you ought to be able to do an object bisection.  ie, replace .o files for the
failing stage with those from a previous stage, relink, retest.  It'll take a
while.  But  this usually results in finding a single trigger file.  Once
that's narrowed down we can figure out the next steps.

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

* [Bug target/113357] [14/15 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c since r14-4664-g04c9cf5c786b94
  2024-01-12 17:01 [Bug bootstrap/113357] New: [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c mikpelinux at gmail dot com
                   ` (4 preceding siblings ...)
  2024-03-22 13:55 ` [Bug target/113357] [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c since r14-4664-g04c9cf5c786b94 law at gcc dot gnu.org
@ 2024-05-07  7:43 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-05-07  7:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|14.0                        |14.2

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 14.1 is being released, retargeting bugs to GCC 14.2.

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

end of thread, other threads:[~2024-05-07  7:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-12 17:01 [Bug bootstrap/113357] New: [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c mikpelinux at gmail dot com
2024-01-12 17:11 ` [Bug target/113357] " pinskia at gcc dot gnu.org
2024-01-12 17:23 ` mikpelinux at gmail dot com
2024-01-27 17:27 ` mikpelinux at gmail dot com
2024-01-31 14:11 ` mikpelinux at gmail dot com
2024-03-22 13:55 ` [Bug target/113357] [14 regression] m68k-linux bootstrap failure in stage2 due to segfault compiling unwind-dw2.c since r14-4664-g04c9cf5c786b94 law at gcc dot gnu.org
2024-05-07  7:43 ` [Bug target/113357] [14/15 " rguenth 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).