<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font size="+1">Hi,</font></p>
    <p><font size="+1">When I ran the ViewExplodedGraph checker
        following the workbook here:
<a class="moz-txt-link-freetext" href="https://github.com/haoNoQ/clang-analyzer-guide/releases/download/v0.1/clang-analyzer-guide-v0.1.pdf">https://github.com/haoNoQ/clang-analyzer-guide/releases/download/v0.1/clang-analyzer-guide-v0.1.pdf</a>
        (BTW, this is the great workbook. I wished that I had seen it
        earlier before tracing checkers in debug mode), I got an
        assertion failure. The test code and command output are as
        follows.<br>
      </font></p>
    <p><font size="+1">Clang revision:</font></p>
    <p><font size="+1">git-svn-id:
        <a class="moz-txt-link-freetext" href="https://llvm.org/svn/llvm-project/cfe/trunk@343150">https://llvm.org/svn/llvm-project/cfe/trunk@343150</a>
        91177308-0d34-0410-b5e6-96231b3b80d8<br>
      </font></p>
    <p><font size="+1"><tt>$ cat cltext.c </tt><tt><br>
        </tt><tt>void foo(int x) {</tt><tt><br>
        </tt><tt>  int y, z;</tt><tt><br>
        </tt><tt>  if (x == 0)</tt><tt><br>
        </tt><tt>    y = 5;</tt><tt><br>
        </tt><tt>  if (!x)</tt><tt><br>
        </tt><tt>    z = 6;</tt><tt><br>
        </tt><tt>}</tt></font><font size="+1"><br>
      </font></p>
    <p><font size="+1"><tt>$ ~/work/git-repos/llvm/debug-git/bin/clang-8
          -cc1 -analyze -analyzer-checker=debug.ViewExplodedGraph
          cltext.c </tt><tt><br>
        </tt><tt>Writing '/tmp/ExprEngine-388602.dot'... clang-8:
          /home/lu/work/git-repos/llvm/src-git/tools/clang/lib/AST/Stmt.cpp:307:
          int64_t clang::Stmt::getID(const clang::ASTContext &)
          const: Assertion `Out && "Wrong allocator used"'
          failed.</tt><tt><br>
        </tt><tt>Stack dump:</tt><tt><br>
        </tt><tt>0.    Program arguments:
          /home/lu/work/git-repos/llvm/debug-git/bin/clang-8 -cc1
          -analyze -analyzer-checker=debug.ViewExplodedGraph cltext.c </tt><tt><br>
        </tt><tt>1.    <eof> parser at end of file</tt><tt><br>
        </tt><tt>#0 0x00007f433db989d9
          llvm::sys::PrintStackTrace(llvm::raw_ostream&)
          /home/lu/work/git-repos/llvm/src-git/lib/Support/Unix/Signals.inc:490:11</tt><tt><br>
        </tt><tt>#1 0x00007f433db98b89
          PrintStackTraceSignalHandler(void*)
          /home/lu/work/git-repos/llvm/src-git/lib/Support/Unix/Signals.inc:554:1</tt><tt><br>
        </tt><tt>#2 0x00007f433db96de6 llvm::sys::RunSignalHandlers()
          /home/lu/work/git-repos/llvm/src-git/lib/Support/Signals.cpp:66:5</tt><tt><br>
        </tt><tt>#3 0x00007f433db991a7 SignalHandler(int)
          /home/lu/work/git-repos/llvm/src-git/lib/Support/Unix/Signals.inc:353:1</tt><tt><br>
        </tt><tt>#4 0x00007f433cf29390 __restore_rt
          (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)</tt><tt><br>
        </tt><tt>#5 0x00007f433a955428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0</tt><tt><br>
        </tt><tt>#6 0x00007f433a95702a abort
          /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0</tt><tt><br>
        </tt><tt>#7 0x00007f433a94dbd7 __assert_fail_base
          /build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0</tt><tt><br>
        </tt><tt>#8 0x00007f433a94dc82
          (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)</tt><tt><br>
        </tt><tt>#9 0x00007f433939254e
          clang::Stmt::getID(clang::ASTContext const&) const
          /home/lu/work/git-repos/llvm/src-git/tools/clang/lib/AST/Stmt.cpp:0:3</tt><tt><br>
        </tt><tt>#10 0x00007f43346563c0
llvm::DOTGraphTraits<clang::ento::ExplodedGraph*>::dumpProgramPoint(clang::ProgramPoint,
          clang::ASTContext const&, llvm::raw_string_ostream&)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:3121:11</tt><tt><br>
        </tt><tt>#11 0x00007f4334654d46
llvm::DOTGraphTraits<clang::ento::ExplodedGraph*>::getNodeLabel[abi:cxx11](clang::ento::ExplodedNode
          const*, clang::ento::ExplodedGraph*)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:3164:7</tt><tt><br>
        </tt><tt>#12 0x00007f433465239a
llvm::GraphWriter<clang::ento::ExplodedGraph*>::writeNode(clang::ento::ExplodedNode*)
/home/lu/work/git-repos/llvm/src-git/include/llvm/Support/GraphWriter.h:173:30</tt><tt><br>
        </tt><tt>#13 0x00007f4334652000
          llvm::GraphWriter<clang::ento::ExplodedGraph*>::writeNodes()
/home/lu/work/git-repos/llvm/src-git/include/llvm/Support/GraphWriter.h:156:5</tt><tt><br>
        </tt><tt>#14 0x00007f4334651bc8
llvm::GraphWriter<clang::ento::ExplodedGraph*>::writeGraph(std::__cxx11::basic_string<char,
          std::char_traits<char>, std::allocator<char> >
          const&)
/home/lu/work/git-repos/llvm/src-git/include/llvm/Support/GraphWriter.h:122:55</tt><tt><br>
        </tt><tt>#15 0x00007f4334651b01 llvm::raw_ostream&
llvm::WriteGraph<clang::ento::ExplodedGraph*>(llvm::raw_ostream&,
          clang::ento::ExplodedGraph* const&, bool, llvm::Twine
          const&)
/home/lu/work/git-repos/llvm/src-git/include/llvm/Support/GraphWriter.h:316:5</tt><tt><br>
        </tt><tt>#16 0x00007f43346519c5
          std::__cxx11::basic_string<char,
          std::char_traits<char>, std::allocator<char> >
llvm::WriteGraph<clang::ento::ExplodedGraph*>(clang::ento::ExplodedGraph*
          const&, llvm::Twine const&, bool, llvm::Twine
          const&)
/home/lu/work/git-repos/llvm/src-git/include/llvm/Support/GraphWriter.h:339:3</tt><tt><br>
        </tt><tt>#17 0x00007f433463eed2 void
llvm::ViewGraph<clang::ento::ExplodedGraph*>(clang::ento::ExplodedGraph*
          const&, llvm::Twine const&, bool, llvm::Twine
          const&, llvm::GraphProgram::Name)
/home/lu/work/git-repos/llvm/src-git/include/llvm/Support/GraphWriter.h:0:26</tt><tt><br>
        </tt><tt>#18 0x00007f433463a0b8
          clang::ento::ExprEngine::ViewGraph(bool)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:3212:1</tt><tt><br>
        </tt><tt>#19 0x00007f4334c759a5 (anonymous
namespace)::ExplodedGraphViewer::checkEndAnalysis(clang::ento::ExplodedGraph&,
          clang::ento::BugReporter&, clang::ento::ExprEngine&)
          const
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp:206:3</tt><tt><br>
        </tt><tt>#20 0x00007f4334c75978 void
          clang::ento::check::EndAnalysis::_checkEndAnalysis<(anonymous
          namespace)::ExplodedGraphViewer>(void*,
          clang::ento::ExplodedGraph&,
          clang::ento::BugReporter&, clang::ento::ExprEngine&)
/home/lu/work/git-repos/llvm/src-git/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h:231:3</tt><tt><br>
        </tt><tt>#21 0x00007f43345f02da clang::ento::CheckerFn<void
          (clang::ento::ExplodedGraph&,
          clang::ento::BugReporter&,
clang::ento::ExprEngine&)>::operator()(clang::ento::ExplodedGraph&,
          clang::ento::BugReporter&, clang::ento::ExprEngine&)
          const
/home/lu/work/git-repos/llvm/src-git/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:70:5</tt><tt><br>
        </tt><tt>#22 0x00007f43345ec158
clang::ento::CheckerManager::runCheckersForEndAnalysis(clang::ento::ExplodedGraph&,
          clang::ento::BugReporter&, clang::ento::ExprEngine&)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp:0:5</tt><tt><br>
        </tt><tt>#23 0x00007f433462c9f7
          clang::ento::ExprEngine::processEndWorklist(bool)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:566:1</tt><tt><br>
        </tt><tt>#24 0x00007f433460ff9c
          clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext
          const*, unsigned int,
          llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
          const>)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:150:10</tt><tt><br>
        </tt><tt>#25 0x00007f43357590c5
          clang::ento::ExprEngine::ExecuteWorkList(clang::LocationContext
          const*, unsigned int)
/home/lu/work/git-repos/llvm/src-git/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:165:19</tt><tt><br>
        </tt><tt>#26 0x00007f43356f4a67 (anonymous
          namespace)::AnalysisConsumer::ActionExprEngine(clang::Decl*,
          bool, clang::ento::ExprEngine::InliningModes,
          llvm::DenseSet<clang::Decl const*,
          llvm::DenseMapInfo<clang::Decl const*> >*)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:749:7</tt><tt><br>
        </tt><tt>#27 0x00007f43356f4881 (anonymous
          namespace)::AnalysisConsumer::RunPathSensitiveChecks(clang::Decl*,
          clang::ento::ExprEngine::InliningModes,
          llvm::DenseSet<clang::Decl const*,
          llvm::DenseMapInfo<clang::Decl const*> >*)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:763:5</tt><tt><br>
        </tt><tt>#28 0x00007f43356f4535 (anonymous
          namespace)::AnalysisConsumer::HandleCode(clang::Decl*,
          unsigned int, clang::ento::ExprEngine::InliningModes,
          llvm::DenseSet<clang::Decl const*,
          llvm::DenseMapInfo<clang::Decl const*> >*)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:720:15</tt><tt><br>
        </tt><tt>#29 0x00007f43356e7301 (anonymous
          namespace)::AnalysisConsumer::HandleDeclsCallGraph(unsigned
          int)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:510:5</tt><tt><br>
        </tt><tt>#30 0x00007f43356e5ec8 (anonymous
namespace)::AnalysisConsumer::runAnalysisOnTranslationUnit(clang::ASTContext&)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:560:3</tt><tt><br>
        </tt><tt>#31 0x00007f43356e50e9 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:0:5</tt><tt><br>
        </tt><tt>#32 0x00007f433814054d
          clang::ParseAST(clang::Sema&, bool, bool)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/Parse/ParseAST.cpp:177:12</tt><tt><br>
        </tt><tt>#33 0x00007f433b9c3c7c
          clang::ASTFrontendAction::ExecuteAction()
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/Frontend/FrontendAction.cpp:1018:1</tt><tt><br>
        </tt><tt>#34 0x00007f433b9c36d0 clang::FrontendAction::Execute()
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/Frontend/FrontendAction.cpp:919:7</tt><tt><br>
        </tt><tt>#35 0x00007f433b926ff0
          clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/Frontend/CompilerInstance.cpp:965:7</tt><tt><br>
        </tt><tt>#36 0x00007f433b5b473c
          clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/lu/work/git-repos/llvm/src-git/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:259:8</tt><tt><br>
        </tt><tt>#37 0x000000000023f76b cc1_main(llvm::ArrayRef<char
          const*>, char const*, void*)
/home/lu/work/git-repos/llvm/src-git/tools/clang/tools/driver/cc1_main.cpp:218:11</tt><tt><br>
        </tt><tt>#38 0x0000000000232522
          ExecuteCC1Tool(llvm::ArrayRef<char const*>,
          llvm::StringRef)
/home/lu/work/git-repos/llvm/src-git/tools/clang/tools/driver/driver.cpp:310:5</tt><tt><br>
        </tt><tt>#39 0x0000000000231158 main
/home/lu/work/git-repos/llvm/src-git/tools/clang/tools/driver/driver.cpp:382:5</tt><tt><br>
        </tt><tt>#40 0x00007f433a940830 __libc_start_main
          /build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0</tt><tt><br>
        </tt><tt>#41 0x0000000000230029 _start
          (/home/lu/work/git-repos/llvm/debug-git/bin/clang-8+0x230029)</tt></font><font
        size="+1"><br>
      </font></p>
    <p><font size="+1"></font><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Love,
Lou

</pre>
  </body>
</html>