<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 --- - Assertion `ThisRegion && "ThisValue was not a memory region"' failed"
href="https://llvm.org/bugs/show_bug.cgi?id=25392">25392</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion `ThisRegion && "ThisValue was not a memory region"' failed
</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>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>kremenek@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alexfh@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>We've started seeing assertion failures in all static analyzer checks on a
large number of translation units in our code base. This started happening
somewhere after r246545.
Here's a repro:
$ cat sa1.cc
struct x0;
template <typename> struct x1 { typedef x0 x2; };
template <typename x3, typename x4 = x3> struct x5 {
public:
typename x1<x4>::x2 operator[](int) {}
};
struct x0 {
public:
template <typename> void x6() const;
x5<int> x7;
} x8;
void x9() { x8.x7[0].x6<x5<int>>(); }
$ clang-tidy -checks=-*,clang-analyzer-unix.API sa1.cc -- -std=c++11
llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp:441: virtual void
clang::ento::CXXInstanceCall::getExtraInvalidatedValues(ValueList &,
clang::ento::RegionAndSymbolInvalidationTraits *) const: Assertion `ThisRegion
&& "ThisValue was not a memory region"' failed.
Aborted (core dumped)
Here's the relevant stack trace:
*** SIGSEGV (@0x10), see go/cppdebug received by PID 23704 (TID 23704); stack
trace: ***
PC: @ 0x135f0f4 (unknown) clang::ento::MemRegion::getBaseRegion()
@ 0x19f120d 928 FailureSignalHandler()
@ 0x7fa928aa9390 1488 __restore_rt
@ 0x1380c7f 448
clang::ento::CallEvent::invalidateRegions()
@ 0x13ab23e 144
clang::ento::ExprEngine::conservativeEvalCall()
@ 0x13abde8 144 clang::ento::ExprEngine::defaultEvalCall()
@ 0x139d49d 352
clang::ento::CheckerManager::runCheckersForEvalCall()
@ 0x13aaf8a 368 clang::ento::ExprEngine::evalCall()
@ 0x13aac77 384 clang::ento::ExprEngine::VisitCallExpr()
@ 0x1389b18 1248 clang::ento::ExprEngine::Visit()
@ 0x1386257 400 clang::ento::ExprEngine::ProcessStmt()
@ 0x1385eec 96
clang::ento::ExprEngine::processCFGElement()
@ 0x139727e 160
clang::ento::CoreEngine::dispatchWorkItem()
@ 0x1396e7a 192 clang::ento::CoreEngine::ExecuteWorkList()
@ 0xb41d82 1120 (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
@ 0xb41891 288 (anonymous
namespace)::AnalysisConsumer::HandleCode()
@ 0xb34c54 480 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
@ 0xd31a9c 48
clang::MultiplexConsumer::HandleTranslationUnit()
@ 0xe3d832 144 clang::ParseAST()
@ 0xd4988f 48 clang::FrontendAction::Execute()
@ 0xc7a542 96 clang::CompilerInstance::ExecuteAction()
@ 0xc332b5 352
clang::tooling::FrontendActionFactory::runInvocation()
@ 0xc330fe 64
clang::tooling::ToolInvocation::runInvocation()
@ 0xc32c0a 1440 clang::tooling::ToolInvocation::run()
@ 0xc341aa 1040 clang::tooling::ClangTool::run()
@ 0xa17f65 1952 clang::tidy::runClangTidy()
@ 0x435b20 1344 main
@ 0x7fa9284fcce8 208 __libc_start_main
@ 0x434af9 (unknown) _start</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>