public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/93808] [9 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-12 11:58 ` jakub at gcc dot gnu.org
  2021-04-30  8:02 ` [Bug target/93808] [9/10/11/12 " rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-12 11:58 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.3                         |9.4

--- Comment #26 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 9.3.0 has been released, adjusting target milestone.

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

* [Bug target/93808] [9/10/11/12 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
  2020-03-12 11:58 ` [Bug target/93808] [9 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping jakub at gcc dot gnu.org
@ 2021-04-30  8:02 ` rguenth at gcc dot gnu.org
  2021-04-30  8:37 ` glaubitz at physik dot fu-berlin.de
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-30  8:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.2.1
            Summary|[9 Regression] [SH] Ruby    |[9/10/11/12 Regression]
                   |crashes with 'Illegal       |[SH] Ruby crashes with
                   |Instruction' with           |'Illegal Instruction' with
                   |-fcrossjumping              |-fcrossjumping

--- Comment #27 from Richard Biener <rguenth at gcc dot gnu.org> ---
Adrian, any results?  (I just assume GCC 11 and trunk are affected now)

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

* [Bug target/93808] [9/10/11/12 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
  2020-03-12 11:58 ` [Bug target/93808] [9 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping jakub at gcc dot gnu.org
  2021-04-30  8:02 ` [Bug target/93808] [9/10/11/12 " rguenth at gcc dot gnu.org
@ 2021-04-30  8:37 ` glaubitz at physik dot fu-berlin.de
  2021-04-30 10:23 ` glaubitz at physik dot fu-berlin.de
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2021-04-30  8:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #28 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Richard Biener from comment #27)
> Adrian, any results?  (I just assume GCC 11 and trunk are affected now)

Not yet. I'll try to remember it this weekend.

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

* [Bug target/93808] [9/10/11/12 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-04-30  8:37 ` glaubitz at physik dot fu-berlin.de
@ 2021-04-30 10:23 ` glaubitz at physik dot fu-berlin.de
  2021-04-30 10:27 ` glaubitz at physik dot fu-berlin.de
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2021-04-30 10:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #29 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to John Paul Adrian Glaubitz from comment #28)
> Adrian, could please apply the following patch to the original string.c file
> and try building & running the whole thing again with the original compiler
> flags, with -fno-cross-jumping and with -O1.  Does one of the added traps go
> off?
> 
> 
> --- "orig ng/string.c.orig"	2019-10-01 20:02:30.000000000 +0900
> +++ "orig ng/string.c"	2020-02-22 18:29:54.904783490 +0900
> @@ -446,13 +446,15 @@
>  # define NONASCII_MASK 0x80808080UL
>  #endif
>  
> +if ( (intptr_t)(e-p) < 0) __builtin_trap ();
> +
>      if (UNALIGNED_WORD_ACCESS || e - p >= SIZEOF_VOIDP) {
>  #if !UNALIGNED_WORD_ACCESS
>  	if ((uintptr_t)p % SIZEOF_VOIDP) {
>  	    int l = SIZEOF_VOIDP - (uintptr_t)p % SIZEOF_VOIDP;
>  	    p += l;
>  	    switch (l) {
> -	      default: UNREACHABLE;
> +	      default: __builtin_trap ();
>  #if SIZEOF_VOIDP > 4
>  	      case 7: if (p[-7]&0x80) return p-7;
>  	      case 6: if (p[-6]&0x80) return p-6;
> @@ -481,7 +483,7 @@
>      }
>  
>      switch (e - p) {
> -      default: UNREACHABLE;
> +      default: __builtin_trap ();
>  #if SIZEOF_VOIDP > 4
>        case 7: if (e[-7]&0x80) return e-7;
>        case 6: if (e[-6]&0x80) return e-6;

I did not see any of the traps fire. With the patch applied, it builds fine and
the Ruby interpreter doesn't crash. I'll attach the full build log.

Without the patch, Ruby crashes, even with the latest gcc-10 version (didn't
test gcc-11 yet as gcc-10 is currently the default for Debian unstable).

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

* [Bug target/93808] [9/10/11/12 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-04-30 10:23 ` glaubitz at physik dot fu-berlin.de
@ 2021-04-30 10:27 ` glaubitz at physik dot fu-berlin.de
  2021-05-02  9:22 ` glaubitz at physik dot fu-berlin.de
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2021-04-30 10:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #30 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
Created attachment 50717
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50717&action=edit
Build log for ruby 2.5 with Oleg's patch applied

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

* [Bug target/93808] [9/10/11/12 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-04-30 10:27 ` glaubitz at physik dot fu-berlin.de
@ 2021-05-02  9:22 ` glaubitz at physik dot fu-berlin.de
  2021-05-02  9:44 ` glaubitz at physik dot fu-berlin.de
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2021-05-02  9:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #31 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to John Paul Adrian Glaubitz from comment #30)
> Created attachment 50717 [details]
> Build log for ruby 2.5 with Oleg's patch applied

Ah, I forgot to add -O1 and -fno-cross-jumping to CFLAGS.

Are the builtin_traps() optimized out for -O2?

I'm building with the correct flags now.

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

* [Bug target/93808] [9/10/11/12 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2021-05-02  9:22 ` glaubitz at physik dot fu-berlin.de
@ 2021-05-02  9:44 ` glaubitz at physik dot fu-berlin.de
  2021-06-01  8:16 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2021-05-02  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #32 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to John Paul Adrian Glaubitz from comment #31)
> Ah, I forgot to add -O1 and -fno-cross-jumping to CFLAGS.
> 
> Are the builtin_traps() optimized out for -O2?
> 
> I'm building with the correct flags now.

Traps also didn't trigger with -O1 and -fno-cross-jumping.

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

* [Bug target/93808] [9/10/11/12 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2021-05-02  9:44 ` glaubitz at physik dot fu-berlin.de
@ 2021-06-01  8:16 ` rguenth at gcc dot gnu.org
  2022-03-22 10:37 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #33 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug target/93808] [9/10/11/12 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2021-06-01  8:16 ` rguenth at gcc dot gnu.org
@ 2022-03-22 10:37 ` rguenth at gcc dot gnu.org
  2022-05-27  9:42 ` [Bug target/93808] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-22 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug target/93808] [10/11/12/13 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2022-03-22 10:37 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:42 ` rguenth at gcc dot gnu.org
  2022-06-28 10:39 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #34 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug target/93808] [10/11/12/13 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2022-05-27  9:42 ` [Bug target/93808] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:39 ` jakub at gcc dot gnu.org
  2023-07-07 10:36 ` [Bug target/93808] [11/12/13/14 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #35 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug target/93808] [11/12/13/14 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2022-06-28 10:39 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:36 ` rguenth at gcc dot gnu.org
  2023-10-30  7:37 ` olegendo at gcc dot gnu.org
  2023-10-30  7:49 ` glaubitz at physik dot fu-berlin.de
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #36 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

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

* [Bug target/93808] [11/12/13/14 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2023-07-07 10:36 ` [Bug target/93808] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2023-10-30  7:37 ` olegendo at gcc dot gnu.org
  2023-10-30  7:49 ` glaubitz at physik dot fu-berlin.de
  13 siblings, 0 replies; 14+ messages in thread
From: olegendo at gcc dot gnu.org @ 2023-10-30  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

Oleg Endo <olegendo at gcc dot gnu.org> changed:

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

--- Comment #37 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to John Paul Adrian Glaubitz from comment #32)
> (In reply to John Paul Adrian Glaubitz from comment #31)
> > Ah, I forgot to add -O1 and -fno-cross-jumping to CFLAGS.
> > 
> > Are the builtin_traps() optimized out for -O2?
> > 
> > I'm building with the correct flags now.
> 
> Traps also didn't trigger with -O1 and -fno-cross-jumping.

Adrian, what happened to this issue in the end?  Do you remember?

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

* [Bug target/93808] [11/12/13/14 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping
       [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2023-10-30  7:37 ` olegendo at gcc dot gnu.org
@ 2023-10-30  7:49 ` glaubitz at physik dot fu-berlin.de
  13 siblings, 0 replies; 14+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2023-10-30  7:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #38 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Oleg Endo from comment #37)
> (In reply to John Paul Adrian Glaubitz from comment #32)
> > (In reply to John Paul Adrian Glaubitz from comment #31)
> > > Ah, I forgot to add -O1 and -fno-cross-jumping to CFLAGS.
> > > 
> > > Are the builtin_traps() optimized out for -O2?
> > > 
> > > I'm building with the correct flags now.
> > 
> > Traps also didn't trigger with -O1 and -fno-cross-jumping.
> 
> Adrian, what happened to this issue in the end?  Do you remember?

Ruby is still being built with -fno-crossjumping on sh4. Let me check, whether
we can drop the flag nowadays with Ruby 3.1 and gcc-13.

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

end of thread, other threads:[~2023-10-30  7:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-93808-4@http.gcc.gnu.org/bugzilla/>
2020-03-12 11:58 ` [Bug target/93808] [9 Regression] [SH] Ruby crashes with 'Illegal Instruction' with -fcrossjumping jakub at gcc dot gnu.org
2021-04-30  8:02 ` [Bug target/93808] [9/10/11/12 " rguenth at gcc dot gnu.org
2021-04-30  8:37 ` glaubitz at physik dot fu-berlin.de
2021-04-30 10:23 ` glaubitz at physik dot fu-berlin.de
2021-04-30 10:27 ` glaubitz at physik dot fu-berlin.de
2021-05-02  9:22 ` glaubitz at physik dot fu-berlin.de
2021-05-02  9:44 ` glaubitz at physik dot fu-berlin.de
2021-06-01  8:16 ` rguenth at gcc dot gnu.org
2022-03-22 10:37 ` rguenth at gcc dot gnu.org
2022-05-27  9:42 ` [Bug target/93808] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:39 ` jakub at gcc dot gnu.org
2023-07-07 10:36 ` [Bug target/93808] [11/12/13/14 " rguenth at gcc dot gnu.org
2023-10-30  7:37 ` olegendo at gcc dot gnu.org
2023-10-30  7:49 ` glaubitz at physik dot fu-berlin.de

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).