[llvm-bugs] [Bug 41753] New: Assertion failure for initialized __complex__ types clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:47: Assertion `NonLoc::isCompoundType(t)' failed.
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun May 5 07:55:00 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41753
Bug ID: 41753
Summary: Assertion failure for initialized __complex__ types
clang/include/clang/StaticAnalyzer/Core/PathSensitive/
BasicValueFactory.h:47: Assertion
`NonLoc::isCompoundType(t)' failed.
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: dkszelethus at gmail.com
CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org
On rC359979:
$ cat complex.cpp
struct ComplexInitTest {
ComplexInitTest() {
x = {1.0f, 1.0f};
y = {1, 1};
}
__complex__ float x;
__complex__ int y;
};
void fComplexTest() {
ComplexInitTest x;
}
$ clang -cc1 -analyze -analyzer-checker=core complex.cpp
clang:
llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:47:
clang::ento::CompoundValData::CompoundValData(clang::QualType,
llvm::ImmutableList<SVal>): Assertion `NonLoc::isCompoundType(t)' failed.
Stack dump:
0. Program arguments: ../../../build/bin/clang -cc1 -analyze
-analyzer-checker=core complex.cpp
1. <eof> parser at end of file
2. While analyzing stack:
#0 Calling ComplexInitTest::ComplexInitTest at line 11
#1 Calling fComplexTest
3. complex.cpp:4:9: Error evaluating statement
4. complex.cpp:4:9: Error evaluating statement
#0 0x00007fcf20e94c39 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
llvm/lib/Support/Unix/Signals.inc:494:11
#1 0x00007fcf20e94de9 PrintStackTraceSignalHandler(void*)
llvm/lib/Support/Unix/Signals.inc:558:1
#2 0x00007fcf20e936f6 llvm::sys::RunSignalHandlers()
llvm/lib/Support/Signals.cpp:67:5
#3 0x00007fcf20e9549b SignalHandler(int)
llvm/lib/Support/Unix/Signals.inc:357:1
#4 0x00007fcf201ab890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#5 0x00007fcf1d54be97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#6 0x00007fcf1d54d801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
#7 0x00007fcf1d53d39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
#8 0x00007fcf1d53d412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
#9 0x00007fcf1677a05d
clang::ento::CompoundValData::CompoundValData(clang::QualType,
llvm::ImmutableList<clang::ento::SVal>)
llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:48:3
#10 0x00007fcf16778af8
clang::ento::BasicValueFactory::getCompoundValData(clang::QualType,
llvm::ImmutableList<clang::ento::SVal>)
llvm/tools/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp:136:5
#11 0x00007fcf168bb2d4
clang::ento::SValBuilder::makeCompoundVal(clang::QualType,
llvm::ImmutableList<clang::ento::SVal>)
llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:251:42
#12 0x00007fcf168b79b0
clang::ento::ExprEngine::VisitInitListExpr(clang::InitListExpr const*,
clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&)
llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp:753:48
#13 0x00007fcf1688a3a1 clang::ento::ExprEngine::Visit(clang::Stmt const*,
clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&)
llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:1670:7
#14 0x00007fcf1688662c clang::ento::ExprEngine::ProcessStmt(clang::Stmt const*,
clang::ento::ExplodedNode*)
llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:744:9
#15 0x00007fcf16886319
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*)
llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:590:7
#16 0x00007fcf1686966a clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock
const*, unsigned int, clang::ento::ExplodedNode*)
llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:440:1
#17 0x00007fcf16868f1c
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&)
llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:195:1
#18 0x00007fcf16868ad5
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>)
llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:129:3
#19 0x00007fcf17c83484
clang::ento::ExprEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int)
llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:170:5
#20 0x00007fcf17c1dfa7 (anonymous
namespace)::AnalysisConsumer::RunPathSensitiveChecks(clang::Decl*,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*)
llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:772:8
#21 0x00007fcf17c1db65 (anonymous
namespace)::AnalysisConsumer::HandleCode(clang::Decl*, unsigned int,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*)
llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:745:15
#22 0x00007fcf17c100f1 (anonymous
namespace)::AnalysisConsumer::HandleDeclsCallGraph(unsigned int)
llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:539:31
#23 0x00007fcf17c0ec48 (anonymous
namespace)::AnalysisConsumer::runAnalysisOnTranslationUnit(clang::ASTContext&)
llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:585:3
#24 0x00007fcf17c0dfa0 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:0:5
#25 0x00007fcf1a1d655e clang::ParseAST(clang::Sema&, bool, bool)
llvm/tools/clang/lib/Parse/ParseAST.cpp:178:12
#26 0x00007fcf1ebed4a2 clang::ASTFrontendAction::ExecuteAction()
llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1037:1
#27 0x00007fcf1ebecec0 clang::FrontendAction::Execute()
llvm/tools/clang/lib/Frontend/FrontendAction.cpp:938:7
#28 0x00007fcf1eb6988e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:945:7
#29 0x00007fcf1e7e7461
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:273:8
#30 0x0000000000240943 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) llvm/tools/clang/tools/driver/cc1_main.cpp:225:13
#31 0x00000000002344b1 ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef) llvm/tools/clang/tools/driver/driver.cpp:309:5
#32 0x0000000000233841 main llvm/tools/clang/tools/driver/driver.cpp:381:5
#33 0x00007fcf1d52eb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#34 0x000000000023302a _start (../../../build/bin/clang+0x23302a)
Aborted (core dumped)
--
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/20190505/bd1f7ae4/attachment-0001.html>
More information about the llvm-bugs
mailing list