-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR23057: fix use-after-free due to local token buffer in ParseCXXAmbi…
…guousParenExpression, by Dmitry Polukhin Differential Revision: http://reviews.llvm.org/D16572 A test/Parser/cxx-ambig-paren-expr-asan.cpp M lib/Parse/ParseExprCXX.cpp llvm-svn: 259750
- Loading branch information
1 parent
f650441
commit 703a93c
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s | ||
|
|
||
| // This syntax error used to cause use-after free due to token local buffer | ||
| // in ParseCXXAmbiguousParenExpression. | ||
| int H((int()[)]); | ||
| // expected-error@-1 {{expected expression}} | ||
| // expected-error@-2 {{expected ']'}} | ||
| // expected-note@-3 {{to match this '['}} | ||
| // expected-error@-4 {{expected ';' after top level declarator}} |