r259622 - Fix miscompile and rejects-valids when disambiguating after an ambiguous
Bill Seurer via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 3 11:03:33 PST 2016
On 02/03/16 11:30, Renato Golin via cfe-commits wrote:
> On 3 February 2016 at 02:58, Richard Smith via cfe-commits
> <cfe-commits at lists.llvm.org> wrote:
>> Author: rsmith
>> Date: Tue Feb 2 20:58:20 2016
>> New Revision: 259622
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=259622&view=rev
>> Log:
>> Fix miscompile and rejects-valids when disambiguating after an ambiguous
>> C-style-cast to function/array type or parenthesized function-style cast/array
>> indexing.
>
> Hi Richard,
>
> After bisecting, I found that your commit is the responsible for this
> test-suite failure on AArch64:
>
> 1. /external/buildbot/clang-native-arm-lnt/test/test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:181:45:
> current parser token ';'
> 2. /external/buildbot/clang-native-arm-lnt/test/test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:165:1:
> parsing function body 'image_continue'
> 3. /external/buildbot/clang-native-arm-lnt/test/test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:165:1:
> in compound statement ('{}')
> 4. /external/buildbot/clang-native-arm-lnt/test/test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:181:5:
> in compound statement ('{}')
>
> http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/1330
>
> http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/16211
>
> http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/4487
>
> Can you have a look, please?
>
> cheers,
> --renato
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
This causes a similar failure on powerpc64 (both big and little endian).
Note that this was found during the running of the lnt tests.
/home/seurer/llvm/install/llvm-test3/bin/clang -DNOMEMOPT
-DGS_LIB_DEFAULT=\"/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs:/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs/fonts\"
-DNOPRIVATE
-I/home/seurer/sandbox/test-2016-02-03_18-03-09/MultiSource/Benchmarks/MallocBench/gs
-I/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs
-I/home/seurer/llvm-test-suite/include -I../../../../include
-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -DNDEBUG
-Wno-implicit-function-declaration -O3 -ffp-contract=off
-fomit-frame-pointer -c
/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c
-o Output/zpaint.llvm.o
TEST /home/seurer/llvm/install/llvm-test3/bin/clang FAILED: process
terminated by signal (exit status 254)!
error: command failed while generating
/home/seurer/sandbox/test-2016-02-03_18-03-09/MultiSource/Benchmarks/MallocBench/gs/Output/zpaint.llvm.o.compile
---
clang-3.9:
/home/seurer/llvm/llvm-test3/tools/clang/include/clang/AST/Type.h:589:
const clang::ExtQualsTypeCommonBase* clang::QualType::getCommonPtr()
const: Assertion `!isNull() && "Cannot retrieve a NULL type pointer"'
failed.
0 clang-3.9 0x0000000011975ad4
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 116
1 clang-3.9 0x0000000011975f30
2 clang-3.9 0x0000000011972dfc llvm::sys::RunSignalHandlers() + 124
3 clang-3.9 0x00000000119730e0
4 0x0000100000040478 __kernel_sigtramp_rt64 + 0
5 libc.so.6 0x00001000004d0a88 gsignal + 72
6 libc.so.6 0x00001000004d693c abort + 620
7 libc.so.6 0x00001000004c65b4
8 libc.so.6 0x00001000004c66a4 __assert_fail + 100
9 clang-3.9 0x0000000012811dec clang::Sema::BuildUnaryOp(clang::Scope*,
clang::SourceLocation, clang::UnaryOperatorKind, clang::Expr*) + 236
10 clang-3.9 0x0000000012812214 clang::Sema::ActOnUnaryOp(clang::Scope*,
clang::SourceLocation, clang::tok::TokenKind, clang::Expr*) + 68
11 clang-3.9 0x00000000124a6664 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 5188
12 clang-3.9 0x00000000124a779c clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 44
13 clang-3.9 0x00000000124ac928
clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&,
bool, bool, clang::OpaquePtr<clang::QualType>&, clang::SourceLocation&)
+ 2376
14 clang-3.9 0x00000000124a5b68 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 2376
15 clang-3.9 0x00000000124a779c clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 44
16 clang-3.9 0x00000000124a7888
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 72
17 clang-3.9 0x000000001247d144
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
+ 756
18 clang-3.9 0x0000000012489fa0
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1472
19 clang-3.9 0x000000001248c978
clang::Parser::ParseSimpleDeclaration(unsigned int,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool,
clang::Parser::ForRangeInit*) + 536
20 clang-3.9 0x000000001248ce20 clang::Parser::ParseDeclaration(unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&)
+ 576
21 clang-3.9 0x00000000124e472c
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&) + 5116
22 clang-3.9 0x00000000124e4960
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*) + 144
23 clang-3.9 0x00000000124e92c4
clang::Parser::ParseCompoundStatementBody(bool) + 1284
24 clang-3.9 0x00000000124e9758
clang::Parser::ParseCompoundStatement(bool, unsigned int) + 72
25 clang-3.9 0x00000000124e97dc
clang::Parser::ParseCompoundStatement(bool) + 28
26 clang-3.9 0x00000000124e44bc
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&) + 4492
27 clang-3.9 0x00000000124e4960
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*) + 144
28 clang-3.9 0x00000000124e4af4
clang::Parser::ParseStatement(clang::SourceLocation*, bool) + 116
29 clang-3.9 0x00000000124e7f1c
clang::Parser::ParseIfStatement(clang::SourceLocation*) + 1116
30 clang-3.9 0x00000000124e431c
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*,
clang::Parser::ParsedAttributesWithRange&) + 4076
31 clang-3.9 0x00000000124e4960
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, clang::Parser::AllowedContsructsKind, clang::SourceLocation*) + 144
32 clang-3.9 0x00000000124e92c4
clang::Parser::ParseCompoundStatementBody(bool) + 1284
33 clang-3.9 0x00000000124eb484
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 244
34 clang-3.9 0x00000000124682dc
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::LateParsedAttrList*) + 2924
35 clang-3.9 0x0000000012489f30
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1360
36 clang-3.9 0x000000001246479c
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 332
37 clang-3.9 0x0000000012464e44
38 clang-3.9 0x0000000012464ed8
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 72
39 clang-3.9 0x000000001246acfc
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1676
40 clang-3.9 0x000000001246b81c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
+ 556
41 clang-3.9 0x000000001245f3dc clang::ParseAST(clang::Sema&, bool,
bool) + 780
42 clang-3.9 0x0000000011e1192c
clang::ASTFrontendAction::ExecuteAction() + 124
43 clang-3.9 0x00000000121132c0 clang::CodeGenAction::ExecuteAction() + 128
44 clang-3.9 0x0000000011e12b58 clang::FrontendAction::Execute() + 664
45 clang-3.9 0x0000000011de7410
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 384
46 clang-3.9 0x0000000011ea92a4
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2244
47 clang-3.9 0x0000000010563b78 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2936
48 clang-3.9 0x0000000010514654 main + 1300
49 libc.so.6 0x00001000004b4d00
50 libc.so.6 0x00001000004b4ef8 __libc_start_main + 200
Stack dump:
0. Program arguments: /home/seurer/llvm/install/llvm-test3/bin/clang-3.9
-cc1 -triple powerpc64le-unknown-linux-gnu -emit-obj -disable-free
-main-file-name zpaint.c -mrelocation-model static -mthread-model posix
-fmath-errno -ffp-contract=off -masm-verbose -mconstructor-aliases
-fuse-init-array -target-cpu ppc64le -mfloat-abi hard -target-abi elfv2
-dwarf-column-info -debugger-tuning=gdb -coverage-file
/home/seurer/sandbox/test-2016-02-03_18-03-09/MultiSource/Benchmarks/MallocBench/gs/Output/zpaint.llvm.o
-resource-dir
/home/seurer/llvm/install/llvm-test3/bin/../lib/clang/3.9.0 -D NOMEMOPT
-D
GS_LIB_DEFAULT="/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs:/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs/fonts"
-D NOPRIVATE -I
/home/seurer/sandbox/test-2016-02-03_18-03-09/MultiSource/Benchmarks/MallocBench/gs
-I /home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs -I
/home/seurer/llvm-test-suite/include -I ../../../../include -D
_GNU_SOURCE -D __STDC_LIMIT_MACROS -D NDEBUG -internal-isystem
/usr/local/include -internal-isystem
/home/seurer/llvm/install/llvm-test3/bin/../lib/clang/3.9.0/include
-internal-externc-isystem /usr/include/powerpc64le-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem
/usr/include -O3 -Wno-implicit-function-declaration
-fdebug-compilation-dir
/home/seurer/sandbox/test-2016-02-03_18-03-09/MultiSource/Benchmarks/MallocBench/gs
-ferror-limit 19 -fmessage-length 0 -fno-signed-char -fobjc-runtime=gcc
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o
Output/zpaint.llvm.o -x c
/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c
1.
/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:181:45:
current parser token ';'
2.
/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:165:1:
parsing function body 'image_continue'
3.
/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:165:1:
in compound statement ('{}')
4.
/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:181:5:
in compound statement ('{}')
clang-3.9: error: unable to execute command: Aborted (core dumped)
clang-3.9: error: clang frontend command failed due to signal (use -v to
see invocation)
clang version 3.9.0 (trunk 259622)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/seurer/llvm/install/llvm-test3/bin
clang-3.9: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed
source, and associated run script.
clang-3.9: note: diagnostic msg:
--
-Bill Seurer
More information about the cfe-commits
mailing list