<html>
<head>
<base href="https://bugs.llvm.org/">
</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 `!isNull() && "Cannot retrieve a NULL type pointer"' failed."
href="https://bugs.llvm.org/show_bug.cgi?id=32454">32454</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion `!isNull() && "Cannot retrieve a NULL type pointer"' 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>enhancement
</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>xiangzhai83@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Hi LLVM developers,
Attached a preprocessed file and patch -Np1 -i
<a href="https://reviews.llvm.org/file/data/2m5owkeaowjeno3uezdu/PHID-FILE-6xyrx42oh2bcljjto7ok/D30771.diff">https://reviews.llvm.org/file/data/2m5owkeaowjeno3uezdu/PHID-FILE-6xyrx42oh2bcljjto7ok/D30771.diff</a>
clang++ -cc1 -triple x86_64-isoft-linux -analyze -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name k3bdevice.cpp
-analyzer-store=region -analyzer-opt-analyze-nested-blocks
-analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=apiModeling
-analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus
-analyzer-checker=security.insecureAPI.UncheckedReturn
-analyzer-checker=security.insecureAPI.getpw
-analyzer-checker=security.insecureAPI.gets
-analyzer-checker=security.insecureAPI.mktemp
-analyzer-checker=security.insecureAPI.mkstemp
-analyzer-checker=security.insecureAPI.vfork
-analyzer-checker=nullability.NullPassedToNonnull
-analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w
-mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-resource-dir /usr/lib/clang/5.0.0 -isystem /usr/local/include -D
HAVE_QT5WEBKITWIDGETS -D KCOREADDONS_LIB -D QT_CORE_LIB -D QT_NO_DEBUG -D
QT_NO_URL_CAST_FROM_STRING -D _GNU_SOURCE -D _LARGEFILE64_SOURCE -D
k3bdevice_EXPORTS -internal-isystem /usr/local/include -internal-isystem
/usr/lib/clang/5.0.0/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -Wno-long-long -std=gnu++11
-fdeprecated-macro -ferror-limit 19 -fmessage-length 0 -fvisibility hidden
-fvisibility-inlines-hidden -fno-operator-names -fobjc-runtime=gcc
-fdiagnostics-show-option -x c++ k3bdevice.cpp
clang++: /data/project/LLVM/llvm/tools/clang/include/clang/AST/Type.h:613:
const clang::ExtQualsTypeCommonBase *clang::QualType::getCommonPtr() const:
Assertion `!isNull() && "Cannot retrieve a NULL type pointer"' failed.
#0 0x00007f78d3796b29 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/data/project/LLVM/llvm/lib/Support/Unix/Signals.inc:398:11
#1 0x00007f78d3796cd9 PrintStackTraceSignalHandler(void*)
/data/project/LLVM/llvm/lib/Support/Unix/Signals.inc:462:1
#2 0x00007f78d3794c63 llvm::sys::RunSignalHandlers()
/data/project/LLVM/llvm/lib/Support/Signals.cpp:0:5
#3 0x00007f78d37970a2 SignalHandler(int)
/data/project/LLVM/llvm/lib/Support/Unix/Signals.inc:252:1
#4 0x00007f78d9074e60 __restore_rt (/lib/libpthread.so.0+0x10e60)
#5 0x00007f78d1c5a5cf __GI_raise
/builddir/build/BUILD/glibc-2.24/signal/../sysdeps/unix/sysv/linux/raise.c:58:0
#6 0x00007f78d1c5c1ca __GI_abort
/builddir/build/BUILD/glibc-2.24/stdlib/abort.c:91:0
#7 0x00007f78d1c52ae7 __assert_fail_base
/builddir/build/BUILD/glibc-2.24/assert/assert.c:92:0
#8 0x00007f78d1c52b92 (/lib/libc.so.6+0x2cb92)
#9 0x000000000095c875 clang::QualType::getCommonPtr() const
/data/project/LLVM/llvm/tools/clang/include/clang/AST/Type.h:615:43
#10 0x0000000000a35ab9 clang::QualType::getCanonicalType() const
/data/project/LLVM/llvm/tools/clang/include/clang/AST/Type.h:5494:20
#11 0x0000000000a35a4c clang::ASTContext::getCanonicalType(clang::QualType)
const
/data/project/LLVM/llvm/tools/clang/include/clang/AST/ASTContext.h:2070:40
#12 0x00000000034c6082
clang::ento::MemRegionManager::getElementRegion(clang::QualType,
clang::ento::NonLoc, clang::ento::MemRegion const*, clang::ASTContext&)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp:924:20
#13 0x0000000003530a9e (anonymous
namespace)::SimpleSValBuilder::evalBinOpLN(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::BinaryOperatorKind, clang::ento::Loc, clang::ento::NonLoc,
clang::QualType)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:963:39
#14 0x00000000035262f6
clang::ento::SValBuilder::evalBinOp(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::BinaryOperatorKind, clang::ento::SVal, clang::ento::SVal,
clang::QualType)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp:399:12
#15 0x0000000002fb838b (anonymous
namespace)::MallocChecker::SValBinMulOp(clang::ento::CheckerContext&,
clang::Expr const*, clang::Expr const*,
llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:795:32
#16 0x0000000002fb4794 (anonymous
namespace)::MallocChecker::checkPostStmt(clang::CallExpr const*,
clang::ento::CheckerContext&) const
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:920:28
#17 0x0000000002fb2335 void
clang::ento::check::PostStmt<clang::CallExpr>::_checkStmt<(anonymous
namespace)::MallocChecker>(void*, clang::Stmt const*,
clang::ento::CheckerContext&)
/data/project/LLVM/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h:105:3
#18 0x0000000003448532 clang::ento::CheckerFn<void (clang::Stmt const*,
clang::ento::CheckerContext&)>::operator()(clang::Stmt const*,
clang::ento::CheckerContext&) const
/data/project/LLVM/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:59:5
#19 0x0000000003442a0d (anonymous
namespace)::CheckStmtContext::runChecker(clang::ento::CheckerFn<void
(clang::Stmt const*, clang::ento::CheckerContext&)>, clang::ento::NodeBuilder&,
clang::ento::ExplodedNode*)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp:161:5
#20 0x000000000343e7cd void expandGraphWithCheckers<(anonymous
namespace)::CheckStmtContext>((anonymous namespace)::CheckStmtContext,
clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNodeSet const&)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp:123:16
#21 0x000000000343e2db clang::ento::CheckerManager::runCheckersForStmt(bool,
clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNodeSet const&, clang::Stmt
const*, clang::ento::ExprEngine&, bool)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp:175:1
#22 0x0000000003487298
clang::ento::CheckerManager::runCheckersForPostStmt(clang::ento::ExplodedNodeSet&,
clang::ento::ExplodedNodeSet const&, clang::Stmt const*,
clang::ento::ExprEngine&, bool)
/data/project/LLVM/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:206:3
#23 0x00000000034b1f74 clang::ento::ExprEngine::VisitCallExpr(clang::CallExpr
const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp:494:23
#24 0x00000000034779c4 clang::ento::ExprEngine::Visit(clang::Stmt const*,
clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:1148:7
#25 0x000000000347350c clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::ExplodedNode*)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:464:5
#26 0x0000000003473076
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:313:7
#27 0x000000000345cfe6 clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock
const*, unsigned int, clang::ento::ExplodedNode*)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:532:1
#28 0x000000000345c6cc
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:279:7
#29 0x000000000345c18c
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:216:3
#30 0x0000000001dd3c18
clang::ento::ExprEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int)
/data/project/LLVM/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:109:19
#31 0x0000000001d7cb43 (anonymous
namespace)::AnalysisConsumer::ActionExprEngine(clang::Decl*, bool,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:719:7
#32 0x0000000001d7c881 (anonymous
namespace)::AnalysisConsumer::RunPathSensitiveChecks(clang::Decl*,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:741:5
#33 0x0000000001d7c4cb (anonymous
namespace)::AnalysisConsumer::HandleCode(clang::Decl*, unsigned int,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:687:5
#34 0x0000000001d6f6ad (anonymous
namespace)::AnalysisConsumer::HandleDeclsCallGraph(unsigned int)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:498:5
#35 0x0000000001d6d68b (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
/data/project/LLVM/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:550:7
#36 0x0000000001e05b4a clang::ParseAST(clang::Sema&, bool, bool)
/data/project/LLVM/llvm/tools/clang/lib/Parse/ParseAST.cpp:159:13
#37 0x00000000011a96ac clang::ASTFrontendAction::ExecuteAction()
/data/project/LLVM/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:613:1
#38 0x00000000011a903f clang::FrontendAction::Execute()
/data/project/LLVM/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:516:7
#39 0x0000000001129d07
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/data/project/LLVM/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:960:7
#40 0x000000000132df58
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/data/project/LLVM/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:249:25
#41 0x000000000086c7f5 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /data/project/LLVM/llvm/tools/clang/tools/driver/cc1_main.cpp:221:13
#42 0x000000000085ed69 ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef)
/data/project/LLVM/llvm/tools/clang/tools/driver/driver.cpp:299:5
#43 0x000000000085d340 main
/data/project/LLVM/llvm/tools/clang/tools/driver/driver.cpp:380:12
#44 0x00007f78d1c462f1 __libc_start_main
/builddir/build/BUILD/glibc-2.24/csu/../csu/libc-start.c:323:0
#45 0x000000000085c19a _start
(/data/project/LLVM/llvm/debug-build/bin/clang+++0x85c19a)
Stack dump:
0. Program arguments: /data/project/LLVM/llvm/debug-build/bin/clang++ -cc1
-triple x86_64-isoft-linux -analyze -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name k3bdevice.cpp -analyzer-store=region
-analyzer-opt-analyze-nested-blocks -analyzer-eagerly-assume
-analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix
-analyzer-checker=deadcode -analyzer-checker=cplusplus
-analyzer-checker=security.insecureAPI.UncheckedReturn
-analyzer-checker=security.insecureAPI.getpw
-analyzer-checker=security.insecureAPI.gets
-analyzer-checker=security.insecureAPI.mktemp
-analyzer-checker=security.insecureAPI.mkstemp
-analyzer-checker=security.insecureAPI.vfork
-analyzer-checker=nullability.NullPassedToNonnull
-analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w
-mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-resource-dir /usr/lib/clang/5.0.0 -isystem /usr/local/include -D
HAVE_QT5WEBKITWIDGETS -D KCOREADDONS_LIB -D QT_CORE_LIB -D QT_NO_DEBUG -D
QT_NO_URL_CAST_FROM_STRING -D _GNU_SOURCE -D _LARGEFILE64_SOURCE -D
k3bdevice_EXPORTS -internal-isystem /usr/local/include -internal-isystem
/usr/lib/clang/5.0.0/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -Wno-long-long -std=gnu++11
-fdeprecated-macro -ferror-limit 19 -fmessage-length 0 -fvisibility hidden
-fvisibility-inlines-hidden -fno-operator-names -fobjc-runtime=gcc
-fdiagnostics-show-option -x c++ k3bdevice.cpp
1. <eof> parser at end of file
2. While analyzing stack:
#0 K3b::Device::DiskInfo diskInfo() const
3. libk3bdevice/k3bdevice.cpp:2166:43: Error evaluating statement
4. libk3bdevice/k3bdevice.cpp:2166:43: Error evaluating statement
Aborted (coredump)
I will try to fix it!
Regards,
Leslie Zhai</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>