<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 - segfault/deadlock with default lambda argument to generic lambda"
   href="https://bugs.llvm.org/show_bug.cgi?id=34706">34706</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>segfault/deadlock with default lambda argument to generic lambda
          </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>normal
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>diagonaldevice@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>#include <functional>

int main(int argc, char *argv[])
{
    auto warning = [](
        auto point,
        std::function<void()> additional_output = []{}
    ) { };

    warning(0.0);
}


The outcome of compilation is nondeterministic.
On my machine, compiling it 100 times, I got:
 - 86 times: compiler segfault (see attachments)
 - 11 times: successful compilation
 -  3 times: compiler deadlocks? No output, have to hit Ctrl-C to abort


It seems (but I am not certain due to the nondeterministism)
that any of the following modifications to the test input cause
it to stop reproducing the deadlock/segfault:
 - Changing 'point' to 'double'
 - Changing 'additional_output' to 'auto'
 - Changing the call to 'warning(0.0, []{});'</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>