<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - crash on ill formed code"
   href="http://llvm.org/bugs/show_bug.cgi?id=21517">21517</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>crash on ill formed code
          </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>MacOS X
          </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++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>Axel.Naumann@cern.ch
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13305" name="attach_13305" title="reproducer / PP sources">attachment 13305</a> <a href="attachment.cgi?id=13305&action=edit" title="reproducer / PP sources">[details]</a></span>
reproducer / PP sources

I can reproduce this with

clang version 3.6.0 (<a href="mailto:git@github.com">git@github.com</a>:llvm-mirror/clang.git
5e7180b8436993360d97b8d749f75cbdcc3967c4) (<a href="mailto:git@github.com">git@github.com</a>:llvm-mirror/llvm.git
6128ca928de2c07590c8867566adfc161844e72a)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

and

Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix


running


$ clang++ -std=c++1y -fsyntax-only capture.cxx
capture.cxx:12:27: error: attempt to use a deleted function
capture<S> gen() { return S(); }
                          ^
capture.cxx:6:3: note: '~capture' has been explicitly marked deleted here
  ~capture() = delete;
  ^
0  clang                    0x000000010ee4a1fb void
std::__1::seed_seq::generate<unsigned int*>(unsigned int*, unsigned int*) +
10539
1  clang                    0x000000010ee4a96b void
std::__1::seed_seq::generate<unsigned int*>(unsigned int*, unsigned int*) +
12443
2  libsystem_platform.dylib 0x00007fff9003c5aa _sigtramp + 26
3  libsystem_platform.dylib 000000000000000000 _sigtramp + 1878801008
4  clang                    0x000000010dc2b9c5 void
std::__1::vector<clang::FixItHint, std::__1::allocator<clang::FixItHint>
<span class="quote">>::__push_back_slow_path<clang::FixItHint>(clang::FixItHint&&) + 62629</span >
5  clang                    0x000000010dc2567e void
std::__1::vector<clang::FixItHint, std::__1::allocator<clang::FixItHint>
<span class="quote">>::__push_back_slow_path<clang::FixItHint>(clang::FixItHint&&) + 37214</span >
6  clang                    0x000000010dc2fb87 void
std::__1::vector<clang::FixItHint, std::__1::allocator<clang::FixItHint>
<span class="quote">>::__push_back_slow_path<clang::FixItHint>(clang::FixItHint&&) + 79463</span >
7  clang                    0x000000010dccb383
llvm::SmallVectorTemplateBase<clang::OverloadCandidate, false>::grow(unsigned
long) + 85507
8  clang                    0x000000010dccd1c5
llvm::SmallVectorTemplateBase<clang::OverloadCandidate, false>::grow(unsigned
long) + 93253
9  clang                    0x000000010dccccfe
llvm::SmallVectorTemplateBase<clang::OverloadCandidate, false>::grow(unsigned
long) + 92030
10 clang                    0x000000010d98256a
llvm::SmallVectorImpl<clang::LambdaIntroducer::LambdaCapture>::operator=(llvm::SmallVectorImpl<clang::LambdaIntroducer::LambdaCapture>&&)
+ 136218
11 clang                    0x000000010d97de7f
llvm::SmallVectorImpl<clang::LambdaIntroducer::LambdaCapture>::operator=(llvm::SmallVectorImpl<clang::LambdaIntroducer::LambdaCapture>&&)
+ 118063
12 clang                    0x000000010d97d0d9
llvm::SmallVectorImpl<clang::LambdaIntroducer::LambdaCapture>::operator=(llvm::SmallVectorImpl<clang::LambdaIntroducer::LambdaCapture>&&)
+ 114569
13 clang                    0x000000010d983b6f
llvm::SmallVectorImpl<clang::LambdaIntroducer::LambdaCapture>::operator=(llvm::SmallVectorImpl<clang::LambdaIntroducer::LambdaCapture>&&)
+ 141855
14 clang                    0x000000010d98445e
llvm::SmallVectorImpl<clang::LambdaIntroducer::LambdaCapture>::operator=(llvm::SmallVectorImpl<clang::LambdaIntroducer::LambdaCapture>&&)
+ 144142
15 clang                    0x000000010d997de5
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 37989
16 clang                    0x000000010d9254a5 void
std::__1::vector<clang::CodeGen::LValue,
std::__1::allocator<clang::CodeGen::LValue>
<span class="quote">>::__push_back_slow_path<clang::CodeGen::LValue const&>(clang::CodeGen::LValue</span >
const&&&) + 65237
17 clang                    0x000000010d99737c
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 35324
18 clang                    0x000000010d996dc9
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 33865
19 clang                    0x000000010d996296
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 30998
20 clang                    0x000000010d995603
llvm::SmallVectorTemplateBase<clang::ParsedTemplateArgument,
false>::grow(unsigned long) + 27779
21 clang                    0x000000010d915986 void
std::__1::vector<clang::CodeGen::LValue,
std::__1::allocator<clang::CodeGen::LValue>
<span class="quote">>::__push_back_slow_path<clang::CodeGen::LValue const&>(clang::CodeGen::LValue</span >
const&&&) + 950
22 clang                    0x000000010d5c644e
std::__1::__tree<std::__1::__value_type<clang::edit::FileOffset,
clang::edit::EditedSource::FileEdit>,
std::__1::__map_value_compare<clang::edit::FileOffset,
std::__1::__value_type<clang::edit::FileOffset,
clang::edit::EditedSource::FileEdit>, std::__1::less<clang::edit::FileOffset>,
true>, std::__1::allocator<std::__1::__value_type<clang::edit::FileOffset,
clang::edit::EditedSource::FileEdit> >
<span class="quote">>::destroy(std::__1::__tree_node<std::__1::__value_type<clang::edit::FileOffset,</span >
clang::edit::EditedSource::FileEdit>, void*>*) + 5694
23 clang                    0x000000010d598023 void
std::__1::vector<clang::FrontendInputFile,
std::__1::allocator<clang::FrontendInputFile>
<span class="quote">>::__push_back_slow_path<clang::FrontendInputFile</span >
const&>(clang::FrontendInputFile const&&&) + 20755
24 clang                    0x000000010d55bed6 void
std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*,
std::__1::__tree_node_base<void*>*) + 4678
25 clang                    0x000000010d553413
26 clang                    0x000000010d557d60 void
std::__1::vector<llvm::SourceMgr::SrcBuffer,
std::__1::allocator<llvm::SourceMgr::SrcBuffer>
<span class="quote">>::__push_back_slow_path<llvm::SourceMgr::SrcBuffer>(llvm::SourceMgr::SrcBuffer&&)</span >
+ 2048
27 libdyld.dylib            0x00007fff92caa5fd start + 1
28 libdyld.dylib            0x0000000000000030 start + 1832213044
Stack dump:
0.    Program arguments: /Users/axel/build/llvm/opt-inst/bin/clang -cc1 -triple
x86_64-apple-macosx10.9.0 -fsyntax-only -disable-free -disable-llvm-verifier
-main-file-name capture.cxx -mrelocation-model pic -pic-level 2 -mthread-model
posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 241.9 -dwarf-column-info -resource-dir
/Users/axel/build/llvm/opt-inst/bin/../lib/clang/3.6.0 -stdlib=libc++
-std=c++1y -fdeprecated-macro -fdebug-compilation-dir
/Users/axel/Dropbox/CxxISO -ferror-limit 19 -fmessage-length 127
-stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0
-fencode-extended-block-signature -fcxx-exceptions -fexceptions
-fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -x c++
capture.cxx
1.    capture.cxx:12:30: current parser token ';'
2.    capture.cxx:12:18: parsing function body 'gen'
3.    capture.cxx:12:18: in compound statement ('{}')
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.6.0 (<a href="mailto:git@github.com">git@github.com</a>:llvm-mirror/clang.git
5e7180b8436993360d97b8d749f75cbdcc3967c4) (<a href="mailto:git@github.com">git@github.com</a>:llvm-mirror/llvm.git
6128ca928de2c07590c8867566adfc161844e72a)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/b1/xp46rm512wv7mbrx82vpf3m00000gn/T/capture-836176.cpp
clang: note: diagnostic msg:
/var/folders/b1/xp46rm512wv7mbrx82vpf3m00000gn/T/capture-836176.sh
clang: note: diagnostic msg:

********************</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>