<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 failure in QualType::getCommonPtr (via clang::ento::MemRegionManager::getElementRegion)"
   href="https://bugs.llvm.org/show_bug.cgi?id=34374">34374</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure in QualType::getCommonPtr (via clang::ento::MemRegionManager::getElementRegion)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>alexfh@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat getElementRegion-crash2.cc
typedef struct { int x0; } x1;
struct x2 {
  bool x3();
  x1 *x4;
  int x5;
} * x6;
bool x2::x3() {
  x5 = reinterpret_cast<unsigned char *>(x6) -
       reinterpret_cast<unsigned char *>(1);
  x1 x7 = x4[0];
  x5 + x7.x0;
}
$ clang-tidy -checks=-*,clang-analyzer-* getElementRegion-crash2.cc --
-sdt=c++11
assert.h assertion failed at clang/include/clang/AST/Type.h:628 in const
clang::ExtQualsTypeCommonBase *clang::QualType::getCommonPtr() const: !isNull()
&& "Cannot retrieve a NULL type pointer"
    @          0x544749a  __assert_fail
    @           0x5e9285  clang::QualType::getCommonPtr()
    @           0x5dde09  clang::QualType::getCanonicalType()
    @          0x1b6304c  clang::ASTContext::getCanonicalType()
    @          0x2dc1122  clang::ento::MemRegionManager::getElementRegion()
    @          0x2e73258  (anonymous
namespace)::SimpleSValBuilder::evalBinOpLN()
    @          0x2d2a8ee  clang::ento::SValBuilder::evalBinOp()
    @          0x2e74db4  (anonymous
namespace)::SimpleSValBuilder::simplifySVal()::Simplifier::VisitSymIntExpr()
    @          0x2e74992  clang::ento::SymExprVisitor<>::Visit()
    @          0x2e746ea  (anonymous
namespace)::SimpleSValBuilder::simplifySVal()::Simplifier::VisitNonLocSymbolVal()
    @          0x2e7426b  clang::ento::SValVisitor<>::Visit()
    @          0x2e7352f  (anonymous
namespace)::SimpleSValBuilder::simplifySVal()
    @          0x2e709cb  (anonymous
namespace)::SimpleSValBuilder::evalBinOpNN()
    @          0x2d2abb2  clang::ento::SValBuilder::evalBinOp()
    @          0x2e1d316  clang::ento::ExprEngine::evalBinOp()
    @          0x2e4af60  clang::ento::ExprEngine::VisitBinaryOperator()
    @          0x2e12cdb  clang::ento::ExprEngine::Visit()
    @          0x2e0fe44  clang::ento::ExprEngine::ProcessStmt()
    @          0x2e0faca  clang::ento::ExprEngine::processCFGElement()
    @          0x2e3dc66  clang::ento::CoreEngine::HandlePostStmt()
    @          0x2e3d566  clang::ento::CoreEngine::dispatchWorkItem()
    @          0x2e3d0a8  clang::ento::CoreEngine::ExecuteWorkList()
    @          0x2138e05  clang::ento::ExprEngine::ExecuteWorkList()
    @          0x20e1802  (anonymous
namespace)::AnalysisConsumer::ActionExprEngine()
    @          0x20e15c1  (anonymous
namespace)::AnalysisConsumer::RunPathSensitiveChecks()
    @          0x20e1285  (anonymous namespace)::AnalysisConsumer::HandleCode()
    @          0x20d4963  (anonymous
namespace)::AnalysisConsumer::HandleDeclsCallGraph()
    @          0x20d2be7  (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
    @          0x25136ce  clang::MultiplexConsumer::HandleTranslationUnit()</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>