<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Assertion failure in clang::ento::PathDiagnosticLocation::create"
href="https://bugs.llvm.org/show_bug.cgi?id=39976">39976</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion failure in clang::ento::PathDiagnosticLocation::create
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dcoughlin@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hokein@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dcoughlin@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>$ cat test-clang__ento__PathDiagnosticLocation.cc
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
class a;
class b {
public:
a *c() { return d || 0 ? 0 : g; }
int d;
a *g;
};
# 2 "" 2
# 3 "" 2
# 2 "" 2
# 2 "" 2
# 2 "" 2
# 6 "" 2
# 2 "" 2
# 0 "" 2
# 2 "" 2
# 9 "" 2
class a {
public:
~a();
void e(bool);
};
# 2 "" 2
# 2 "" 2
# 2 "" 2
# 8 "" 2
class f;
class D {
f *h();
void i();
};
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
# 1 "" 1
class j {
b k;
public:
a *operator->() { a l = *k.c(); }
operator a *() {
a *m = k.c();
return m;
}
}
# 2 "" 2
# 1 "" 2
# 9 "" 2
# 0 "" 2
# 2 "" 2
# 2 "" 2
;
# 2 "" 2
# 9 "" 2
class f {
public:
j n;
};
# 9 "" 2
void D::i() {
f d = *h();
delete d.n;
d.n->e(false);
}
$ ./clang-tidy -checks="-*,clang-analyzer*"
test-clang__ento__PathDiagnosticLocation.cc --
Unexpected ProgramPoint
UNREACHABLE executed at
third_party/llvm/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp:746!
#6 0x000055bb2c951b3d
clang::ento::PathDiagnosticLocation::create(clang::ProgramPoint const&,
clang::SourceManager const&) (./clang-tidy+0x367eb3d)
#7 0x000055bb2c8f84d2
clang::ento::TrackConstraintBRVisitor::VisitNode(clang::ento::ExplodedNode
const*, clang::ento::BugReporterContext&, clang::ento::BugReport&)
(./clang-tidy+0x36254d2)
#8 0x000055bb2c8e46e8 generateVisitorsDiagnostics(clang::ento::BugReport*,
clang::ento::ExplodedNode const*, clang::ento::BugReporterContext&)
(./clang-tidy+0x36116e8)
#9 0x000055bb2c8dfcb2
clang::ento::GRBugReporter::generatePathDiagnostics(llvm::ArrayRef<clang::ento::PathDiagnosticConsumer*>,
llvm::ArrayRef<clang::ento::BugReport*>&) (./clang-tidy+0x360ccb2)
#10 0x000055bb2c8e1adb
clang::ento::BugReporter::generateDiagnosticForConsumerMap(clang::ento::BugReport*,
llvm::ArrayRef<clang::ento::PathDiagnosticConsumer*>,
llvm::ArrayRef<clang::ento::BugReport*>) (./clang-tidy+0x360eadb)
#11 0x000055bb2c8dc6f9
clang::ento::BugReporter::FlushReport(clang::ento::BugReportEquivClass&)
(./clang-tidy+0x36096f9)
#12 0x000055bb2c8db9cb clang::ento::BugReporter::FlushReports()
(./clang-tidy+0x36089cb)
#13 0x000055bb2c6a67a8 (anonymous
namespace)::AnalysisConsumer::HandleCode(clang::Decl*, unsigned int,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*) (./clang-tidy+0x33d37a8)
#14 0x000055bb2c691d50 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
(./clang-tidy+0x33bed50)
#15 0x000055bb2cc0520c
clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&)
(./clang-tidy+0x393220c)
#16 0x000055bb2cdc0414 clang::ParseAST(clang::Sema&, bool, bool)
(./clang-tidy+0x3aed414)
#17 0x000055bb2cbfed63 clang::FrontendAction::Execute()
(./clang-tidy+0x392bd63)
#18 0x000055bb2cab37e1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(./clang-tidy+0x37e07e1)
#19 0x000055bb2ca0c7d1
clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>,
clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>,
clang::DiagnosticConsumer*) (./clang-tidy+0x37397d1)
#20 0x000055bb2c30ec27
clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&,
clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::string>,
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, bool,
llvm::StringRef)::ActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>,
clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>,
clang::DiagnosticConsumer*) (./clang-tidy+0x303bc27)
#21 0x000055bb2ca0c53a clang::tooling::ToolInvocation::runInvocation(char
const*, clang::driver::Compilation*,
std::shared_ptr<clang::CompilerInvocation>,
std::shared_ptr<clang::PCHContainerOperations>) (./clang-tidy+0x373953a)
#22 0x000055bb2ca0bf26 clang::tooling::ToolInvocation::run()
(./clang-tidy+0x3738f26)
#23 0x000055bb2ca0e625
clang::tooling::ClangTool::run(clang::tooling::ToolAction*)
(./clang-tidy+0x373b625)
#24 0x000055bb2c30a96f
clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&,
clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::string>,
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, bool, llvm::StringRef)
(./clang-tidy+0x303796f)</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>