<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 --- - clang: infinite loop in clang::Sema::CreateOverloadedBinOp on invalid input"
href="http://llvm.org/bugs/show_bug.cgi?id=22396">22396</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang: infinite loop in clang::Sema::CreateOverloadedBinOp on invalid 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>Not sure how useful such report is, but it pops us very early if I am trying to
fuzz clang.
template<int N> struct S { };
template<typename T> S<T() + T()> operator+(T, T);
S<0> s;
int k = s + s;
% clang -cc1 z.cc
<some error messages follow, then clang hangs>
Stacks looks like this:
#0 0x0000000001700b7d in clang::VarDecl::getInit() const ()
#1 0x0000000002859763 in clang::FunctionDecl::getMinRequiredArguments() const
()
#2 0x00000000024928ea in
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&, bool) ()
#3 0x00000000023d0479 in
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool) ()
#4 0x00000000023d78dd in
clang::Sema::AddArgumentDependentLookupCandidates(clang::DeclarationName,
clang::SourceLocation, llvm::ArrayRef<clang::Expr*>,
clang::TemplateArgumentListInfo*, clang::OverloadCandidateSet&, bool) ()
#5 0x00000000023e2330 in
clang::Sema::CreateOverloadedBinOp(clang::SourceLocation, unsigned int,
clang::UnresolvedSetImpl const&, clang::Expr*, clang::Expr*) ()
#6 0x000000000228aa73 in clang::Sema::BuildBinOp(clang::Scope*,
clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*)
()
#7 0x00000000024e2c83 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformBinaryOperator(clang::BinaryOperator*)
()
#8 0x00000000024d8dec in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&) ()
#9 0x00000000024da0b3 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName) ()
This hang by itself might not be interesting, but if there is an interest in
fuzzing clang these will need to be fixed.
FTR, I am also hitting <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [fuzz, binary] Assertion `EndColNo <= map.getSourceLine().size() && "Invalid range!"' failed."
href="show_bug.cgi?id=21954">http://llvm.org/bugs/show_bug.cgi?id=21954</a></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>