зеркало из https://github.com/mozilla/gecko-dev.git
Bug 597946 - ANGLE compiler freezes on shader with bad #ifdef (ANGLE bug 40) - r=vlad, a=blocking-betaN
This commit is contained in:
Родитель
a1f1fb9e83
Коммит
ca3cc7125a
|
@ -7,6 +7,8 @@ Local patches:
|
|||
|
||||
angle-fixes.patch - fix angle issues 51 & 52
|
||||
|
||||
angle-bug-40.patch - fix angle issue 40: freeze when compiling bad #ifdef shader
|
||||
|
||||
== Visual Studio Solution Files ==
|
||||
|
||||
The VS solution/project files that are used to build ANGLE are built
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
# HG changeset patch
|
||||
# Parent 29f85e1308509423edf7da745dcb5ad2b2c1d88d
|
||||
diff --git a/gfx/angle/src/compiler/preprocessor/cpp.c b/gfx/angle/src/compiler/preprocessor/cpp.c
|
||||
--- a/gfx/angle/src/compiler/preprocessor/cpp.c
|
||||
+++ b/gfx/angle/src/compiler/preprocessor/cpp.c
|
||||
@@ -489,19 +489,18 @@ static int CPPifdef(int defined, yystype
|
||||
cpp->elsetracker++;
|
||||
cpp->elsedepth[cpp->elsetracker] = 0;
|
||||
if (token != CPP_IDENTIFIER) {
|
||||
defined ? CPPErrorToInfoLog("ifdef"):CPPErrorToInfoLog("ifndef");
|
||||
} else {
|
||||
Symbol *s = LookUpSymbol(macros, name);
|
||||
token = cpp->currentInput->scan(cpp->currentInput, yylvalpp);
|
||||
if (token != '\n') {
|
||||
- CPPWarningToInfoLog("unexpected tokens following #ifdef preprocessor directive - expected a newline");
|
||||
- while (token != '\n')
|
||||
- token = cpp->currentInput->scan(cpp->currentInput, yylvalpp);
|
||||
+ CPPErrorToInfoLog("unexpected tokens following #ifdef preprocessor directive - expected a newline");
|
||||
+ return 0;
|
||||
}
|
||||
if (((s && !s->details.mac.undef) ? 1 : 0) != defined)
|
||||
token = CPPelse(1, yylvalpp);
|
||||
}
|
||||
return token;
|
||||
} // CPPifdef
|
||||
|
||||
static int CPPline(yystypepp * yylvalpp)
|
|
@ -494,9 +494,8 @@ static int CPPifdef(int defined, yystypepp * yylvalpp)
|
|||
Symbol *s = LookUpSymbol(macros, name);
|
||||
token = cpp->currentInput->scan(cpp->currentInput, yylvalpp);
|
||||
if (token != '\n') {
|
||||
CPPWarningToInfoLog("unexpected tokens following #ifdef preprocessor directive - expected a newline");
|
||||
while (token != '\n')
|
||||
token = cpp->currentInput->scan(cpp->currentInput, yylvalpp);
|
||||
CPPErrorToInfoLog("unexpected tokens following #ifdef preprocessor directive - expected a newline");
|
||||
return 0;
|
||||
}
|
||||
if (((s && !s->details.mac.undef) ? 1 : 0) != defined)
|
||||
token = CPPelse(1, yylvalpp);
|
||||
|
|
Загрузка…
Ссылка в новой задаче