[llvm-bugs] [Bug 34779] New: Assertion failure in CStringChecker::CheckLocation
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Sep 29 06:20:36 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34779
Bug ID: 34779
Summary: Assertion failure in CStringChecker::CheckLocation
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: ganna at apple.com
Reporter: alexfh at google.com
CC: dcoughlin at apple.com, kremenek at apple.com,
llvm-bugs at lists.llvm.org, noqnoqneo at gmail.com
$ cat test-__CStringChecker__evalStrcpyCommon.cc
void strcpy(unsigned char *, unsigned char *);
unsigned char a, b;
void c() { strcpy(&a, &b); }
$ clang-tidy -checks=-*,clang-analyzer-unix.cstring*
test-__CStringChecker__evalStrcpyCommon.cc -- -std=c++11
assertion failed at
llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:293 in
clang::ento::ProgramStateRef (anonymous
namespace)::CStringChecker::CheckLocation(clang::ento::CheckerContext &,
clang::ento::ProgramStateRef, const clang::Expr *, clang::ento::SVal, const
char *) const: ER->getValueType() == C.getASTContext().CharTy && "CheckLocation
should only be called with char* ElementRegions"
*** Check failure stack trace: ***
@ 0x52c61ca __assert_fail
@ 0x1b3b2cb (anonymous
namespace)::CStringChecker::CheckLocation()
@ 0x1b3e278 (anonymous
namespace)::CStringChecker::evalStrcpyCommon()
@ 0x1b37571 (anonymous namespace)::CStringChecker::evalStrcpy()
@ 0x1b36174 (anonymous namespace)::CStringChecker::evalCall()
@ 0x1b34f30 clang::ento::eval::Call::_evalCall<>()
@ 0x1c554b2 clang::ento::CheckerFn<>::operator()()
@ 0x1c5262e clang::ento::CheckerManager::runCheckersForEvalCall()
@ 0x1cb62f9 clang::ento::ExprEngine::evalCall()
@ 0x1cb61bc clang::ento::ExprEngine::VisitCallExpr()
@ 0x1c6ef27 clang::ento::ExprEngine::Visit()
@ 0x1c6bf01 clang::ento::ExprEngine::ProcessStmt()
@ 0x1c6bbba clang::ento::ExprEngine::processCFGElement()
@ 0x1c9a206 clang::ento::CoreEngine::HandlePostStmt()
@ 0x1c99b06 clang::ento::CoreEngine::dispatchWorkItem()
@ 0x1c99668 clang::ento::CoreEngine::ExecuteWorkList()
@ 0xf8c365 clang::ento::ExprEngine::ExecuteWorkList()
@ 0xf33992 (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
@ 0xf33751 (anonymous
namespace)::AnalysisConsumer::RunPathSensitiveChecks()
@ 0xf33415 (anonymous namespace)::AnalysisConsumer::HandleCode()
@ 0xf26ab3 (anonymous
namespace)::AnalysisConsumer::HandleDeclsCallGraph()
@ 0xf24d37 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
@ 0x135bf7e clang::MultiplexConsumer::HandleTranslationUnit()
@ 0x1db73d6 clang::ParseAST()
@ 0x134982a clang::ASTFrontendAction::ExecuteAction()
@ 0x13492c0 clang::FrontendAction::Execute()
@ 0x115f4e2 clang::CompilerInstance::ExecuteAction()
@ 0x1028652
clang::tooling::FrontendActionFactory::runInvocation()
@ 0x10284f3 clang::tooling::ToolInvocation::runInvocation()
--
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/20170929/23d93901/attachment-0001.html>
More information about the llvm-bugs
mailing list