[LLVMbugs] [Bug 24307] New: Segmentation fault when compiling flatbuffers (9a30d3d0df55b51f8e622d92e8e965363b82a998)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jul 29 12:19:37 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24307
Bug ID: 24307
Summary: Segmentation fault when compiling flatbuffers
(9a30d3d0df55b51f8e622d92e8e965363b82a998)
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: alariq at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
clang crashed when issuing "make" on flatbuffers.
repro:
1) git clone https://github.com/google/flatbuffers.git
2) cmake -G "Unix Makefiles"
3) make
4) experience compiler crash
full error message:
--
[ 4%] Building CXX object CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o
In file included from /home/a/prog/3rdparty/flatbuffers/src/idl_parser.cpp:20:
In file included from
/home/a/prog/3rdparty/flatbuffers/include/flatbuffers/idl.h:26:
/home/a/prog/3rdparty/flatbuffers/include/flatbuffers/flatbuffers.h:766:59:
error: use of undeclared identifier 'a'
auto table_a = reinterpret_cast<T *>(buf_.data_at(a.o));
^
/home/a/prog/3rdparty/flatbuffers/include/flatbuffers/flatbuffers.h:767:59:
error: use of undeclared identifier 'b'
auto table_b = reinterpret_cast<T *>(buf_.data_at(b.o));
^
0 libLLVM-3.0.so.1 0x00002ae0d7e6e4bf
1 libLLVM-3.0.so.1 0x00002ae0d7e6e909
2 libpthread.so.0 0x00002ae0d87ab0a0
3 clang 0x0000000000d0f177
clang::CallExpr::CallExpr(clang::ASTContext&, clang::Expr*, clang::Expr**,
unsigned int, clang::QualType, clang::ExprValueKind, clang::SourceLocation) +
263
4 clang 0x00000000009718c9
clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation,
clang::ASTMultiPtr<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool) +
1209
5 clang 0x000000000083952e
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) + 3182
6 clang 0x000000000083372b clang::Parser::ParseCastExpression(bool,
bool, bool&, bool) + 203
7 clang 0x0000000000835d4e clang::Parser::ParseCastExpression(bool,
bool, bool) + 30
8 clang 0x000000000083664f
clang::Parser::ParseAssignmentExpression() + 31
9 clang 0x00000000008374d9 clang::Parser::ParseExpression() + 9
10 clang 0x00000000007fe716
clang::Parser::ParseExprStatement(clang::ParsedAttributes&) + 70
11 clang 0x00000000007fb4e9
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 2841
12 clang 0x00000000007f845c
clang::Parser::ParseCompoundStatementBody(bool) + 1356
13 clang 0x00000000007ff61d
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 141
14 clang 0x0000000000812e15
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 501
15 clang 0x0000000000812ba0
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 128
16 clang 0x000000000082f440
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 2128
17 clang 0x0000000000830334
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 2260
18 clang 0x000000000081edc4
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 1828
19 clang 0x000000000080bd99
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 89
20 clang 0x000000000080c3bd
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 717
21 clang 0x000000000080dfbb
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2747
22 clang 0x000000000082b0a9
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::ParsedAttributes&, clang::Parser::BalancedDelimiterTracker&) + 377
23 clang 0x000000000082bbc8 clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 1432
24 clang 0x00000000008238a9
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 601
25 clang 0x000000000080d8db
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 987
26 clang 0x000000000080e4ce
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 158
27 clang 0x00000000007e802d clang::ParseAST(clang::Sema&, bool) +
269
28 clang 0x00000000006da903 clang::CodeGenAction::ExecuteAction() +
51
29 clang 0x00000000005de983
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 307
30 clang 0x00000000005c9911
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1041
31 clang 0x00000000005c2fc4 cc1_main(char const**, char const**,
char const*, void*) + 804
32 clang 0x00000000005c1f75 main + 6965
33 libc.so.6 0x00002ae0d9588ead __libc_start_main + 253
34 clang 0x00000000005c2b01
Stack dump:
0. Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
idl_parser.cpp -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22 -momit-leaf-frame-pointer -coverage-file
CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o -resource-dir
/usr/bin/../lib/clang/3.0 -I /home/a/prog/3rdparty/flatbuffers/include -I
/home/a/prog/3rdparty/flatbuffers/tests -I
/home/a/prog/3rdparty/flatbuffers/samples -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem /usr/include/c++/v1
-internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /usr/include -Wall
-Werror -Wextra -pedantic -std=c++0x -fdeprecated-macro -ferror-limit 19
-fmessage-length 237 -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o -x c++
/home/a/prog/3rdparty/flatbuffers/src/idl_parser.cpp
1.
/home/a/prog/3rdparty/flatbuffers/include/flatbuffers/flatbuffers.h:770:5:
current parser token ')'
2.
/home/a/prog/3rdparty/flatbuffers/include/flatbuffers/flatbuffers.h:74:1:
parsing namespace 'flatbuffers'
3.
/home/a/prog/3rdparty/flatbuffers/include/flatbuffers/flatbuffers.h:494:1:
parsing struct/union/class body 'FlatBufferBuilder'
4.
/home/a/prog/3rdparty/flatbuffers/include/flatbuffers/flatbuffers.h:763:80:
parsing function body 'CreateVectorOfSortedTables'
5.
/home/a/prog/3rdparty/flatbuffers/include/flatbuffers/flatbuffers.h:763:80: in
compound statement ('{}')
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Preprocessed source(s) are located at:
clang: note: diagnostic msg: /tmp/idl_parser-cQdtlk.ii
make[2]: *** [CMakeFiles/flatbuffers.dir/src/idl_parser.cpp.o] Error 254
make[1]: *** [CMakeFiles/flatbuffers.dir/all] Error 2
make: *** [all] Error 2
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150729/2735dce2/attachment.html>
More information about the llvm-bugs
mailing list