<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW " title="NEW --- - Segmentation fault when compiling flatbuffers (9a30d3d0df55b51f8e622d92e8e965363b82a998)" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24307&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=vSt3vBFtkxRes-P_sxwTQVsDJekRUAbewdpJqbspKJ8&s=2Rz8PJFIvnWrz-FZdczO_HV3uhLb6KSXY_bldM7wvR4&e=">24307</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Segmentation fault when compiling flatbuffers (9a30d3d0df55b51f8e622d92e8e965363b82a998)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alariq@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>clang crashed when issuing "make" on flatbuffers.
repro:
1) git clone <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_google_flatbuffers.git&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=vSt3vBFtkxRes-P_sxwTQVsDJekRUAbewdpJqbspKJ8&s=ssoC-Mg7uyfDGrjqqKNDWOTWaLYaDmMtUU_z60m5xas&e=">https://github.com/google/flatbuffers.git</a>
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
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_bugs_&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=vSt3vBFtkxRes-P_sxwTQVsDJekRUAbewdpJqbspKJ8&s=z4ZZZiSCi-jHA3GhGv6pLrOzb9htdg-NhC0m5cvgz1I&e=">http://llvm.org/bugs/</a> 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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>