Issue 8610 in angleproject: Very long array declarations crash

2 views
Skip to first unread message

kkinn… via monorail

unread,
Mar 14, 2024, 5:02:59 AM3/14/24
to angleproj...@googlegroups.com
Status: Available
Owner: ----
Components: Translator
OS: All
Priority: Medium
Type: Defect

New issue 8610 by kkinn...@apple.com: Very long array declarations crash
https://bugs.chromium.org/p/angleproject/issues/detail?id=8610

TEST_F(ParseTest, LotsOfArraysNoCrash)
{
// FIXME: minimize further, no unknown characters if possible.
std::ostringstream shader;
shader << R"(
int��E=int[])";
for (int i = 0; i < 10000; ++i)
{
shader << "[]";
}
shader << "()";
EXPECT_FALSE(compile(shader.str()));
}

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Git Watcher via monorail

unread,
Apr 12, 2024, 9:30:12 AM4/12/24
to angleproj...@googlegroups.com

Comment #1 on issue 8610 by Git Watcher: Very long array declarations crash
https://bugs.chromium.org/p/angleproject/issues/detail?id=8610#c1

The following revision refers to this bug:
https://chromium.googlesource.com/angle/angle/+/e088af30ff462bae7db2179427ccedbe4bc82001

commit e088af30ff462bae7db2179427ccedbe4bc82001
Author: Scott Marcy <msc...@apple.com>
Date: Thu Mar 28 21:30:59 2024

Parsing very long array declarations crash

Avoid stack overflow crash when parsing arrays with a huge number of
dimensions.

Limits the number of array dimensions to `mMaxExpressionComplexity`
(typically 256). Use `YYABORT` to abort parsing.

Bug: angleproject:8610
Change-Id: Icf3914871b167c820b84ae8f3acba80dbd698af3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5424330
Auto-Submit: Kimmo Kinnunen <kkin...@apple.com>
Reviewed-by: Shahbaz Youssefi <syou...@chromium.org>
Commit-Queue: Shahbaz Youssefi <syou...@chromium.org>

[modify] https://crrev.com/e088af30ff462bae7db2179427ccedbe4bc82001/scripts/code_generation_hashes/ANGLE_shader_translator.json
[modify] https://crrev.com/e088af30ff462bae7db2179427ccedbe4bc82001/src/compiler/translator/glslang.y
[modify] https://crrev.com/e088af30ff462bae7db2179427ccedbe4bc82001/src/compiler/translator/ParseContext.cpp
[modify] https://crrev.com/e088af30ff462bae7db2179427ccedbe4bc82001/src/compiler/translator/ParseContext.h
[modify] https://crrev.com/e088af30ff462bae7db2179427ccedbe4bc82001/src/tests/compiler_tests/Parse_test.cpp
[modify] https://crrev.com/e088af30ff462bae7db2179427ccedbe4bc82001/src/compiler/translator/glslang_tab_autogen.cpp
[modify] https://crrev.com/e088af30ff462bae7db2179427ccedbe4bc82001/src/compiler/translator/glslang_lex_autogen.cpp

kkinn… via monorail

unread,
May 14, 2024, 4:33:19 AM5/14/24
to angleproj...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 8610 by kkinn...@apple.com: Very long array declarations crash
https://bugs.chromium.org/p/angleproject/issues/detail?id=8610#c2

(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages