<html>
<head>
<base href="http://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 --- - crash parsing attribute"
href="http://llvm.org/bugs/show_bug.cgi?id=17105">17105</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>crash parsing attribute
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>nlewycky@google.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>Testcase:
void foo() {}
__attribute__((visibility(hidden))) void bar() { foo(); }
Clang crash:
$ clang -cc1 z.cc
clang:
/usr/local/google/home/nlewycky/llvm/include/llvm/ADT/PointerUnion.h:130: T
llvm::PointerUnion<PT1, PT2>::get() const [with T = clang::Expr*, PT1 =
clang::Expr*, PT2 = clang::IdentifierLoc*]: Assertion `is<T>() && "Invalid
accessor called"' failed.
0 clang 0x0000000003308df3 llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1 clang 0x000000000330907a
2 clang 0x0000000003308abe
3 libpthread.so.0 0x00007f8010074cb0
4 libc.so.6 0x00007f800f09f425 gsignal + 53
5 libc.so.6 0x00007f800f0a2b8b abort + 379
6 libc.so.6 0x00007f800f0980ee
7 libc.so.6 0x00007f800f098192
8 clang 0x0000000001389329
9 clang 0x0000000001388aaa
10 clang 0x0000000001378e83
11 clang 0x0000000001385f36
12 clang 0x00000000013866b9
clang::Sema::ProcessDeclAttributeList(clang::Scope*, clang::Decl*,
clang::AttributeList const*, bool) + 71
13 clang 0x0000000001387465
clang::Sema::ProcessDeclAttributes(clang::Scope*, clang::Decl*,
clang::Declarator const&) + 93
14 clang 0x00000000013401fe
clang::Sema::ActOnFunctionDeclarator(clang::Scope*, clang::Declarator&,
clang::DeclContext*, clang::TypeSourceInfo*, clang::LookupResult&,
llvm::MutableArrayRef<clang::TemplateParameterList*>, bool&) + 7764
15 clang 0x0000000001336023
clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&,
llvm::MutableArrayRef<clang::TemplateParameterList*>) + 2833
16 clang 0x000000000134a1c4
clang::Sema::ActOnStartOfFunctionDef(clang::Scope*, clang::Declarator&) + 194
17 clang 0x00000000011fe627
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
2261
18 clang 0x000000000120f05e
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 544
19 clang 0x00000000011fdc47
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 1079
20 clang 0x00000000011fdd0f
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 189
21 clang 0x00000000011fd4c3
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2783
22 clang 0x00000000011fc9b3
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 415
23 clang 0x00000000011f9285 clang::ParseAST(clang::Sema&, bool, bool)
+ 597
24 clang 0x0000000000db63e3 clang::ASTFrontendAction::ExecuteAction()
+ 321
25 clang 0x0000000000db5f22 clang::FrontendAction::Execute() + 200
26 clang 0x0000000000d88164
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 720
27 clang 0x0000000000d5727f
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1018
28 clang 0x0000000000d4831a cc1_main(char const**, char const**, char
const*, void*) + 717
29 clang 0x0000000000d52a13 main + 551
30 libc.so.6 0x00007f800f08a76d __libc_start_main + 237
31 clang 0x0000000000d479e9
Stack dump:
0. Program arguments:
/usr/local/google/home/nlewycky/llvm/Debug+Asserts/bin/clang -cc1 z.cc
1. z.cc:3:48: current parser token '{'
Aborted (core dumped)
$ clang --version
clang version 3.4 (trunk 190014) (llvm/trunk 188326:190014M)
Target: x86_64-unknown-linux-gnu
Thread model: posix</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>