<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 failed: !NodePtr->isKnownSentinel() with boost::intrusive_ptr on Windows"
   href="https://bugs.llvm.org/show_bug.cgi?id=45033">45033</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed: !NodePtr->isKnownSentinel() with boost::intrusive_ptr on Windows
          </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>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>etienne@atnnn.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23172" name="attach_23172" title="Minimal example">attachment 23172</a> <a href="attachment.cgi?id=23172&action=edit" title="Minimal example">[details]</a></span>
Minimal example

The following code seems to cause clang and clang-cl, 9.0.0 and trunk, to
crash:

    intrusive_ptr<C> a;
    try {
        a = mk();
        mk();
    }
    catch (...) {
    }

Debug logs show

    INSTCOMBINE ITERATION #1 on ?crash@@YAXXZ
    IC: ADDING: 27 instrs to worklist
    IC: Visiting:   %call1 = invoke %struct.C* @"?mk@@YAPEAUC@@XZ"()
              to label %invoke.cont2 unwind label %catch.dispatch
    IC: Visiting:   %a.sroa.0.0 = phi i64 [ %0, %invoke.cont2 ], [ 0, %entry ]
    IC: Visiting:   %1 = catchswitch within none [label %catch] unwind label
%ehcleanup
    IC: Visiting:   %2 = catchpad within %1 [i8* null, i32 64, i8* null]
    IC: Visiting:   catchret from %2 to label %try.cont
    IC: Visiting:   %a.sroa.0.1 = phi i64 [ %0, %invoke.cont2 ], [ %a.sroa.0.0,
%catch ]
    IC: ADD:   %a.sroa.0.1.ptr = phi %struct.C* 
    Assertion failed: !NodePtr->isKnownSentinel(), file
C:\src\llvm_package_2663a25f\llvm-project\llvm\include\llvm/ADT/ilist_iterator.h,
line 139

I've attached the logs and full trimmed down source.

Thanks.</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>