<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 --- - stack-overflow in clang (computeLVForDecl) on 2-line input"
href="http://llvm.org/bugs/show_bug.cgi?id=22398">22398</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>stack-overflow in clang (computeLVForDecl) on 2-line input
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</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>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>kcc@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>found by fuzzing, not sure if this is too interesting.
Here we have either very deep or infinite recursion.
intint foo(struct foo;) { foo(/^) {r?e r;
vk/
% clang++ -c a.cc
==36882==ERROR: AddressSanitizer: stack-overflow on address 0x7fffeac06f80 (pc
0x00000169ab44 bp 0x7fffeac07030 sp 0x7fffeac06f40 T0)
#0 0x169ab43 in clang::Redeclarable<clang::FunctionDecl>::getFirstDecl()
const tools/clang/include/clang/AST/Redeclarable.h:149
#1 0x3283fbb in getLVForNamespaceScopeDecl(clang::NamedDecl const*,
LVComputationKind) tools/clang/lib/AST/Decl.cpp:620:9
#2 0x3236679 in computeLVForDecl(clang::NamedDecl const*,
LVComputationKind) tools/clang/lib/AST/Decl.cpp:1275:12
#3 0x323a32b in getLVForDecl tools/clang/lib/AST/Decl.cpp:1314:22
#4 0x323a32b in getLVForDecl tools/clang/lib/AST/Decl.cpp:1351
#5 0x323a32b in getLVForLocalDecl tools/clang/lib/AST/Decl.cpp:1198
#6 0x323a32b in computeLVForDecl(clang::NamedDecl const*,
LVComputationKind) tools/clang/lib/AST/Decl.cpp:1299
#7 0x323f3d8 in getLVForDecl tools/clang/lib/AST/Decl.cpp:1314:22
#8 0x323f3d8 in getLVForDecl tools/clang/lib/AST/Decl.cpp:1351
#9 0x323f3d8 in clang::NamedDecl::getLinkageInternal() const
tools/clang/lib/AST/Decl.cpp:1024
#10 0x383b355 in computeCachedProperties
tools/clang/lib/AST/Type.cpp:2192:17
#11 0x383b355 in clang::TypePropertyCache<(anonymous
namespace)::Private>::ensure(clang::Type const*)
tools/clang/lib/AST/Type.cpp:2144
#12 0x383bac3 in get tools/clang/lib/AST/Type.cpp:2123:5
#13 0x383bac3 in get tools/clang/lib/AST/Type.cpp:2119
#14 0x383bac3 in computeCachedProperties tools/clang/lib/AST/Type.cpp:2229
#15 0x383bac3 in clang::TypePropertyCache<(anonymous
namespace)::Private>::ensure(clang::Type const*)
tools/clang/lib/AST/Type.cpp:2144
#16 0x383a581 in clang::TypePropertyCache<(anonymous
namespace)::Private>::ensure(clang::Type const*)
tools/clang/lib/AST/Type.cpp:2136:7
#17 0x383a3da in clang::Type::getLinkage() const
tools/clang/lib/AST/Type.cpp:2249:3
#18 0x328664e in getLVForNamespaceScopeDecl(clang::NamedDecl const*,
LVComputationKind) tools/clang/lib/AST/Decl.cpp:764:11
#19 0x3236679 in computeLVForDecl(clang::NamedDecl const*,
LVComputationKind) tools/clang/lib/AST/Decl.cpp:1275:12
#20 0x323a32b in getLVForDecl tools/clang/lib/AST/Decl.cpp:1314:22
#21 0x323a32b in getLVForDecl tools/clang/lib/AST/Decl.cpp:1351
#22 0x323a32b in getLVForLocalDecl tools/clang/lib/AST/Decl.cpp:1198
#23 0x323a32b in computeLVForDecl(clang::NamedDecl const*,
LVComputationKind) tools/clang/lib/AST/Decl.cpp:1299
#24 0x323f3d8 in getLVForDecl tools/clang/lib/AST/Decl.cpp:1314:22
#25 0x323f3d8 in getLVForDecl tools/clang/lib/AST/Decl.cpp:1351
#26 0x323f3d8 in clang::NamedDecl::getLinkageInternal() const
tools/clang/lib/AST/Decl.cpp:1024
#27 0x383b355 in computeCachedProperties
tools/clang/lib/AST/Type.cpp:2192:17
#28 0x383b355 in clang::TypePropertyCache<(anonymous
namespace)::Private>::ensure(clang::Type const*)
tools/clang/lib/AST/Type.cpp:2144
#29 0x383bac3 in get tools/clang/lib/AST/Type.cpp:2123:5
#30 0x383bac3 in get tools/clang/lib/AST/Type.cpp:2119
#31 0x383bac3 in computeCachedProperties tools/clang/lib/AST/Type.cpp:2229
#32 0x383bac3 in clang::TypePropertyCache<(anonymous
namespace)::Private>::ensure(clang::Type const*)
tools/clang/lib/AST/Type.cpp:2144
#33 0x383a581 in clang::TypePropertyCache<(anonymous
namespace)::Private>::ensure(clang::Type const*)
tools/clang/lib/AST/Type.cpp:2136:7
#34 0x383a3da in clang::Type::getLinkage() const
tools/clang/lib/AST/Type.cpp:2249:3
#35 0x328664e in getLVForNamespaceScopeDecl(clang::NamedDecl const*,
LVComputationKind) tools/clang/lib/AST/Decl.cpp:764:11
#36 0x3236679 in computeLVForDecl(clang::NamedDecl const*,
LVComputationKind) tools/clang/lib/AST/Decl.cpp:1275:12
#37 0x323a32b in getLVForDecl tools/clang/lib/AST/Decl.cpp:1314:22
#38 0x323a32b in getLVForDecl tools/clang/lib/AST/Decl.cpp:1351
#39 0x323a32b in getLVForLocalDecl tools/clang/lib/AST/Decl.cpp:1198
<thousands more frames></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>