[llvm-bugs] [Bug 36149] New: Assertion failure in clang::ento::MemRegion::getAsOffset
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jan 30 04:39:06 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36149
Bug ID: 36149
Summary: Assertion failure in
clang::ento::MemRegion::getAsOffset
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: ekarpenkov at apple.com
Reporter: alexfh at google.com
CC: dcoughlin at apple.com, ganna at apple.com,
llvm-bugs at lists.llvm.org
Here's a test case:
namespace std {
template <typename>
class b;
class B {
public:
long c;
};
template <typename f, typename... d>
class b<f(d...)> : B {
public:
f operator()(d...) const;
};
template <typename f, typename... d>
f b<f(d...)>::operator()(d...) const {
bool e = c;
}
struct j {
int _M_once = 0;
};
template <typename g, typename... h>
void call_once(g &&, h &&...);
} // namespace std
void i(std::b<bool()> &l) { l(); }
void k() {
std::j a;
call_once(a, i, k);
}
And a stack trace:
assert.h assertion failed at llvm/tools/clang/include/clang/AST/Type.h:669 in
const clang::ExtQualsTypeCommonBase *clang::QualType::getCommonPtr() const:
!isNull() && "Cannot retrieve a NULL type pointer"
@ 0x555d8a857f76 __assert_fail
@ 0x555d895ac4a4 clang::ento::MemRegion::getAsOffset()
@ 0x555d89555a69 (anonymous namespace)::BindingKey::Make()
@ 0x555d89554424 (anonymous
namespace)::RegionStoreManager::getBindingForField()
@ 0x555d89553f5c (anonymous
namespace)::RegionStoreManager::getBinding()
@ 0x555d8954dc44 (anonymous
namespace)::RegionStoreManager::getBinding()
@ 0x555d8958c5d8 clang::ento::ProgramState::getSVal()
@ 0x555d88ab3600 clang::ento::check::Location::_checkLocation<>()
@ 0x555d895cad7c clang::ento::CheckerManager::runCheckersForLocation()
@ 0x555d895e464f clang::ento::ExprEngine::evalLocation()
@ 0x555d895e4894 clang::ento::ExprEngine::evalLoadCommon()
@ 0x555d895e3a27 clang::ento::ExprEngine::evalLoad()
@ 0x555d895fe42c clang::ento::ExprEngine::VisitCast()
@ 0x555d895da42b clang::ento::ExprEngine::Visit()
@ 0x555d895d7cfe clang::ento::ExprEngine::ProcessStmt()
@ 0x555d895d7a28 clang::ento::ExprEngine::processCFGElement()
@ 0x555d895f79b5 clang::ento::CoreEngine::HandlePostStmt()
@ 0x555d895f6c5c clang::ento::CoreEngine::ExecuteWorkList()
@ 0x555d8862baa3 (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
@ 0x555d8862b62c (anonymous namespace)::AnalysisConsumer::HandleCode()
@ 0x555d886159ee (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180130/0ab5bb64/attachment-0001.html>
More information about the llvm-bugs
mailing list