public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Several test failures due to "Introduce strub: machine-independent stack scrubbing"
@ 2023-12-07 10:12 FX Coudert
  2023-12-07 16:45 ` Alexandre Oliva
  2023-12-07 17:14 ` Alexandre Oliva
  0 siblings, 2 replies; 4+ messages in thread
From: FX Coudert @ 2023-12-07 10:12 UTC (permalink / raw)
  To: GCC Patches; +Cc: Iain Sandoe, Richard Biener, oliva

Hi Alexandre,

The commit https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f0a90c7d7333fc7f554b906245c84bdf04d716d7 (Introduce strub: machine-independent stack scrubbing) has introduced many test failures on x86_64-apple-darwin21:

+FAIL: c-c++-common/strub-apply2.c  -std=gnu++98 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++98 (test for excess errors)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++14 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++14 (test for excess errors)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++17 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++17 (test for excess errors)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++20 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply2.c  -std=gnu++20 (test for excess errors)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++98 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++98 (test for excess errors)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++14 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++14 (test for excess errors)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++17 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++17 (test for excess errors)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++20 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply3.c  -std=gnu++20 (test for excess errors)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++98 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++98 (test for excess errors)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++14 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++14 (test for excess errors)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++17 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++17 (test for excess errors)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++20 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict1.c  -std=gnu++20 (test for excess errors)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++98 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++98 (test for excess errors)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++14 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++14 (test for excess errors)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++17 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++17 (test for excess errors)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++20 (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict2.c  -std=gnu++20 (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O0  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O0  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O1  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O1  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -g  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -g  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -Os  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -Os  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2 -flto -flto-partition=none  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2 -flto -flto-partition=none  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2 -flto  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2 -flto  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O0  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O0  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O1  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O1  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O3 -g  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O3 -g  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -Os  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -Os  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2 -flto -flto-partition=none  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2 -flto -flto-partition=none  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2 -flto  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2 -flto  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O0  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O0  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O1  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O1  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O3 -g  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O3 -g  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -Os  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -Os  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2 -flto -flto-partition=none  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2 -flto -flto-partition=none  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2 -flto  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2 -flto  (test for excess errors)
+FAIL: c-c++-common/strub-apply2.c  -Wc++-compat  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply2.c  -Wc++-compat  (test for excess errors)
+FAIL: c-c++-common/strub-apply3.c  -Wc++-compat  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-apply3.c  -Wc++-compat  (test for excess errors)
+FAIL: c-c++-common/strub-strict1.c  -Wc++-compat  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict1.c  -Wc++-compat  (test for excess errors)
+FAIL: c-c++-common/strub-strict2.c  -Wc++-compat  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/strub-strict2.c  -Wc++-compat  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O0  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O0  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O1  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O1  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -g  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O3 -g  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -Os  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -Os  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2 -flto -flto-partition=none  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2 -flto -flto-partition=none  (test for excess errors)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2 -flto  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-callable2.c   -O2 -flto  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O0  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O0  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O1  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O1  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O3 -g  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O3 -g  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -Os  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -Os  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2 -flto -flto-partition=none  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2 -flto -flto-partition=none  (test for excess errors)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2 -flto  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-inlinable1.c   -O2 -flto  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O0  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O0  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O1  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O1  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O3 -g  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O3 -g  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -Os  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -Os  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2 -flto -flto-partition=none  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2 -flto -flto-partition=none  (test for excess errors)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2 -flto  (internal compiler error: in verify_curr_properties, at passes.cc:2198)
+FAIL: c-c++-common/torture/strub-ptrfn3.c   -O2 -flto  (test for excess errors)


The output for one typical case is:

$ /Users/fx/ibin-20231206/gcc/xgcc -B/Users/fx/ibin-20231206/gcc/  /Users/fx/gcc-upstream/gcc/testsuite/c-c++-common/strub-apply2.c    -fdiagnostics-plain-output   -Wc++-compat  -fstrub=strict -S -o strub-apply2.s
/Users/fx/gcc-upstream/gcc/testsuite/c-c++-common/strub-apply2.c:8:1: error: 'strub' mode 'disabled' selected for 'apply_args', when 'at-calls' was requested
/Users/fx/gcc-upstream/gcc/testsuite/c-c++-common/strub-apply2.c:10:16: sorry, unimplemented: at-calls 'strub' does not support call to '__builtin_apply_args'
during IPA pass: emutls
/Users/fx/gcc-upstream/gcc/testsuite/c-c++-common/strub-apply2.c:12:1: internal compiler error: in verify_curr_properties, at passes.cc:2198


Cheers,
FX

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

* Re: Several test failures due to "Introduce strub: machine-independent stack scrubbing"
  2023-12-07 10:12 Several test failures due to "Introduce strub: machine-independent stack scrubbing" FX Coudert
@ 2023-12-07 16:45 ` Alexandre Oliva
  2023-12-07 17:05   ` FX Coudert
  2023-12-07 17:14 ` Alexandre Oliva
  1 sibling, 1 reply; 4+ messages in thread
From: Alexandre Oliva @ 2023-12-07 16:45 UTC (permalink / raw)
  To: FX Coudert; +Cc: GCC Patches, Iain Sandoe, Richard Biener

On Dec  7, 2023, FX Coudert <fxcoudert@gmail.com> wrote:

> The commit
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f0a90c7d7333fc7f554b906245c84bdf04d716d7
> (Introduce strub: machine-independent stack scrubbing) has introduced
> many test failures on x86_64-apple-darwin21:

Please give the followup commit f908368d2cb50 a try, it should at least
silence the errors.  (but not fix the problem; I suppose we want
strubbing enabled on darwin)

However, I'm very surprised that you're hitting this with the initial
commit.  It's as if strub support was disabled on the target, but even
if you were hitting this with e.g. offloading, only the followup commit
introduced code to disable strub for such targets as nvptx.  Anyway, do
you by any chance have any offloading enabled?

I'll try to trigger this with a cross compiler.  Thanks,

-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

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

* Re: Several test failures due to "Introduce strub: machine-independent stack scrubbing"
  2023-12-07 16:45 ` Alexandre Oliva
@ 2023-12-07 17:05   ` FX Coudert
  0 siblings, 0 replies; 4+ messages in thread
From: FX Coudert @ 2023-12-07 17:05 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: GCC Patches, Iain Sandoe, Richard Biener

> However, I'm very surprised that you're hitting this with the initial
> commit.  It's as if strub support was disabled on the target, but even
> if you were hitting this with e.g. offloading, only the followup commit
> introduced code to disable strub for such targets as nvptx.  Anyway, do
> you by any chance have any offloading enabled?

I may have misidentified the problem, my testing was done on:

LAST_UPDATED: Wed Dec 6 16:01:43 UTC 2023 (revision 458e7c93792)
https://gcc.gnu.org/pipermail/gcc-testresults/2023-December/802595.html

I’m restarting a build right now, will report back.

FX

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

* Re: Several test failures due to "Introduce strub: machine-independent stack scrubbing"
  2023-12-07 10:12 Several test failures due to "Introduce strub: machine-independent stack scrubbing" FX Coudert
  2023-12-07 16:45 ` Alexandre Oliva
@ 2023-12-07 17:14 ` Alexandre Oliva
  1 sibling, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2023-12-07 17:14 UTC (permalink / raw)
  To: FX Coudert; +Cc: GCC Patches, Iain Sandoe, Richard Biener

On Dec  7, 2023, FX Coudert <fxcoudert@gmail.com> wrote:

> The commit
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f0a90c7d7333fc7f554b906245c84bdf04d716d7
> (Introduce strub: machine-independent stack scrubbing) has introduced
> many test failures on x86_64-apple-darwin21:

Nevermind, the followup patch I'd suggested won't help..  The problem is
that after the (expected) errors issued by strub mode pass for those
tests.  The passes that convert the function to SSA mode (and thus
provide the SSA pass property required by emutls) don't run, but emutls
doesn't have the same '&& !seen_error()' condition in its gate function,
so it tries to run, and finds that the required properties aren't there.

This patchlet should cure it.  Testing...

diff --git a/gcc/tree-emutls.cc b/gcc/tree-emutls.cc
index 5dca5a8291356..871e5a14f1e38 100644
--- a/gcc/tree-emutls.cc
+++ b/gcc/tree-emutls.cc
@@ -841,7 +841,7 @@ public:
   bool gate (function *) final override
     {
       /* If the target supports TLS natively, we need do nothing here.  */
-      return !targetm.have_tls;
+      return !targetm.have_tls && !seen_error ();
     }
 
   unsigned int execute (function *) final override

-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

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

end of thread, other threads:[~2023-12-07 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07 10:12 Several test failures due to "Introduce strub: machine-independent stack scrubbing" FX Coudert
2023-12-07 16:45 ` Alexandre Oliva
2023-12-07 17:05   ` FX Coudert
2023-12-07 17:14 ` Alexandre Oliva

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