[clang] [clang] Fix crash with multiple non-parenthsized `sizeof` (PR #101297)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 03:34:58 PDT 2024


https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101297

>From d75b3cef41c370fef939a347935a4f3ed53c46ea Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
Date: Wed, 31 Jul 2024 10:29:04 +0300
Subject: [PATCH 1/4] [clang] Fix crash with multiple non-parenthsized `sizeof`

---
 clang/lib/Parse/ParseExpr.cpp                 |  14 +-
 .../parser-overflow-non-parenthesized.c       | 135 ++++++++++++++++++
 2 files changed, 148 insertions(+), 1 deletion(-)
 create mode 100644 clang/test/Parser/parser-overflow-non-parenthesized.c

diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index e82b565272831..e501d5e91e77d 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -2479,7 +2479,19 @@ Parser::ParseExprAfterUnaryExprOrTypeTrait(const Token &OpTok,
       return ExprError();
     }
 
-    Operand = ParseCastExpression(UnaryExprOnly);
+    // If we're parsing a chain that consists of keywords that could be
+    // followed by a non-parenthesized expression, BalancedDelimiterTracker
+    // is not going to help when the nesting is too deep. In this corner case
+    // we continue to parse with sufficient stack space to avoid crashing.
+    if (OpTok.isOneOf(tok::kw_sizeof, tok::kw___datasizeof, tok::kw___alignof,
+                      tok::kw_alignof, tok::kw__Alignof) &&
+        Tok.isOneOf(tok::kw_sizeof, tok::kw___datasizeof, tok::kw___alignof,
+                    tok::kw_alignof, tok::kw__Alignof))
+      Actions.runWithSufficientStackSpace(Tok.getLocation(), [&] {
+        Operand = ParseCastExpression(UnaryExprOnly);
+      });
+    else
+      Operand = ParseCastExpression(UnaryExprOnly);
   } else {
     // If it starts with a '(', we know that it is either a parenthesized
     // type-name, or it is a unary-expression that starts with a compound
diff --git a/clang/test/Parser/parser-overflow-non-parenthesized.c b/clang/test/Parser/parser-overflow-non-parenthesized.c
new file mode 100644
index 0000000000000..b6c7485274090
--- /dev/null
+++ b/clang/test/Parser/parser-overflow-non-parenthesized.c
@@ -0,0 +1,135 @@
+// RUN: %clang_cc1 %s 2>&1 | FileCheck %s
+
+void f(void) {
+  // 600 sizeof's
+  int a =
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
+  0;
+  (void)a;
+
+  // 600 of sizeof and __alignof
+  int b =
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
+  0;
+  (void)b;
+}
+
+// CHECK: warning: stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely

>From 92bfbcc9d2f078f1caeaa277ba573845cb1cc563 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
Date: Wed, 31 Jul 2024 10:35:30 +0300
Subject: [PATCH 2/4] Add a release note

---
 clang/docs/ReleaseNotes.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 25a9f2836ba3d..4ff660b5bcf93 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -178,6 +178,9 @@ Miscellaneous Clang Crashes Fixed
 - Fixed a crash in C due to incorrect lookup that members in nested anonymous struct/union
   can be found as ordinary identifiers in struct/union definition. (#GH31295)
 
+- Fixed a crash caused by long chains of ``sizeof`` and other similar operators
+  that can be followed by a non-parenthesized expression. (#GH101297)
+
 OpenACC Specific Changes
 ------------------------
 

>From 6969b9ff25bfc77bd29aeab71581495a724d825d Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
Date: Wed, 31 Jul 2024 10:36:20 +0300
Subject: [PATCH 3/4] Fix wrong GH link in release notes

---
 clang/docs/ReleaseNotes.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 4ff660b5bcf93..dc553b18df565 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -179,7 +179,7 @@ Miscellaneous Clang Crashes Fixed
   can be found as ordinary identifiers in struct/union definition. (#GH31295)
 
 - Fixed a crash caused by long chains of ``sizeof`` and other similar operators
-  that can be followed by a non-parenthesized expression. (#GH101297)
+  that can be followed by a non-parenthesized expression. (#GH45061)
 
 OpenACC Specific Changes
 ------------------------

>From 9eded60d7dfd5471b853be6286a91b03b35f48b9 Mon Sep 17 00:00:00 2001
From: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
Date: Thu, 1 Aug 2024 13:34:45 +0300
Subject: [PATCH 4/4] Remove the test

---
 .../parser-overflow-non-parenthesized.c       | 135 ------------------
 1 file changed, 135 deletions(-)
 delete mode 100644 clang/test/Parser/parser-overflow-non-parenthesized.c

diff --git a/clang/test/Parser/parser-overflow-non-parenthesized.c b/clang/test/Parser/parser-overflow-non-parenthesized.c
deleted file mode 100644
index b6c7485274090..0000000000000
--- a/clang/test/Parser/parser-overflow-non-parenthesized.c
+++ /dev/null
@@ -1,135 +0,0 @@
-// RUN: %clang_cc1 %s 2>&1 | FileCheck %s
-
-void f(void) {
-  // 600 sizeof's
-  int a =
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof sizeof
-  0;
-  (void)a;
-
-  // 600 of sizeof and __alignof
-  int b =
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof sizeof __alignof
-  0;
-  (void)b;
-}
-
-// CHECK: warning: stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely



More information about the cfe-commits mailing list