[llvm-bugs] [Bug 41741] New: Crash in clang::ento::FindUninitializedFields::isNonUnionUninit on __complex__ members
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat May 4 07:05:31 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41741
Bug ID: 41741
Summary: Crash in
clang::ento::FindUninitializedFields::isNonUnionUninit
on __complex__ members
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: gribozavr at gmail.com
CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org
At SVN r359969:
$ cat /tmp/t.cc
struct MyComplex {
MyComplex() {}
__complex__ float x;
};
void entry() {
MyComplex x;
}
$ ./bin/clang-tidy -checks="-*,clang-analyzer*" /tmp/t.cc
Error while trying to load a compilation database:
Could not auto-detect compilation database for file "/tmp/t.cc"
No compilation database found in /tmp or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or
directory
json-compilation-database: Error while opening JSON database: No such file or
directory
Running without flags.
All cases are handled!
UNREACHABLE executed at
llvm-project/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:347!
#0 0x000000000068ec04 PrintStackTraceSignalHandler(void*)
(./bin/clang-tidy+0x68ec04)
#1 0x000000000068c99c llvm::sys::RunSignalHandlers()
(./bin/clang-tidy+0x68c99c)
#2 0x000000000068f148 SignalHandler(int) (./bin/clang-tidy+0x68f148)
#3 0x00007f9e90eea0c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
#4 0x00007f9e8fa74fcf raise (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
#5 0x00007f9e8fa763fa abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
#6 0x000000000063dd71 (./bin/clang-tidy+0x63dd71)
#7 0x0000000000d4a324
clang::ento::FindUninitializedFields::isNonUnionUninit(clang::ento::TypedValueRegion
const*, clang::ento::FieldChainInfo) (./bin/clang-tidy+0xd4a324)
#8 0x0000000000d49da8
clang::ento::FindUninitializedFields::FindUninitializedFields(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::ento::TypedValueRegion const*,
clang::ento::UninitObjCheckerOptions const&) (./bin/clang-tidy+0xd49da8)
#9 0x0000000000d51668 void
clang::ento::check::EndFunction::_checkEndFunction<(anonymous
namespace)::UninitializedObjectChecker>(void*, clang::ReturnStmt const*,
clang::ento::CheckerContext&) (./bin/clang-tidy+0xd51668)
#10 0x0000000000d9a899
clang::ento::CheckerManager::runCheckersForEndFunction(clang::ento::NodeBuilderContext&,
clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNode*,
clang::ento::ExprEngine&, clang::ReturnStmt const*) (./bin/clang-tidy+0xd9a899)
#11 0x0000000000dba798
clang::ento::ExprEngine::processEndOfFunction(clang::ento::NodeBuilderContext&,
clang::ento::ExplodedNode*, clang::ReturnStmt const*)
(./bin/clang-tidy+0xdba798)
#12 0x0000000000da1ebf
clang::ento::CoreEngine::HandleBlockEdge(clang::BlockEdge const&,
clang::ento::ExplodedNode*) (./bin/clang-tidy+0xda1ebf)
#13 0x0000000000da188d
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&)
(./bin/clang-tidy+0xda188d)
#14 0x0000000000da145b
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>)
(./bin/clang-tidy+0xda145b)
#15 0x0000000000b46ddf (anonymous
namespace)::AnalysisConsumer::HandleCode(clang::Decl*, unsigned int,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*) (./bin/clang-tidy+0xb46ddf)
#16 0x0000000000b3fc85 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
(./bin/clang-tidy+0xb3fc85)
#17 0x0000000000f3128c
clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&)
(./bin/clang-tidy+0xf3128c)
#18 0x000000000108d933 clang::ParseAST(clang::Sema&, bool, bool)
(./bin/clang-tidy+0x108d933)
#19 0x0000000000f192e0 clang::FrontendAction::Execute()
(./bin/clang-tidy+0xf192e0)
#20 0x0000000000ebdfd1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(./bin/clang-tidy+0xebdfd1)
#21 0x0000000000a14cf6
clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>,
clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>,
clang::DiagnosticConsumer*) (./bin/clang-tidy+0xa14cf6)
#22 0x0000000000698ed5
clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&,
clang::tooling::CompilationDatabase const&,
llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool,
llvm::StringRef)::ActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>,
clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>,
clang::DiagnosticConsumer*) (./bin/clang-tidy+0x698ed5)
#23 0x0000000000a14a66 clang::tooling::ToolInvocation::runInvocation(char
const*, clang::driver::Compilation*,
std::shared_ptr<clang::CompilerInvocation>,
std::shared_ptr<clang::PCHContainerOperations>) (./bin/clang-tidy+0xa14a66)
#24 0x0000000000a14317 clang::tooling::ToolInvocation::run()
(./bin/clang-tidy+0xa14317)
#25 0x0000000000a1619e
clang::tooling::ClangTool::run(clang::tooling::ToolAction*)
(./bin/clang-tidy+0xa1619e)
#26 0x00000000006957c3
clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&,
clang::tooling::CompilationDatabase const&,
llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool, llvm::StringRef)
(./bin/clang-tidy+0x6957c3)
#27 0x00000000004328ed clang::tidy::clangTidyMain(int, char const**)
(./bin/clang-tidy+0x4328ed)
#28 0x00007f9e8fa622b1 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202b1)
#29 0x00000000004309ca _start (./bin/clang-tidy+0x4309ca)
Aborted
--
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/20190504/ee0a7f34/attachment.html>
More information about the llvm-bugs
mailing list