[llvm-bugs] [Bug 34706] New: segfault/deadlock with default lambda argument to generic lambda

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 22 11:09:57 PDT 2017


            Bug ID: 34706
           Summary: segfault/deadlock with default lambda argument to
                    generic lambda
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: diagonaldevice at gmail.com
                CC: llvm-bugs at lists.llvm.org

#include <functional>

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


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, []{});'

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170922/78a1a632/attachment.html>

More information about the llvm-bugs mailing list