[LLVMbugs] [Bug 21517] New: crash on ill formed code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Nov 8 08:51:02 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21517

            Bug ID: 21517
           Summary: crash on ill formed code
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Axel.Naumann at cern.ch
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13305
  --> http://llvm.org/bugs/attachment.cgi?id=13305&action=edit
reproducer / PP sources

I can reproduce this with

clang version 3.6.0 (git at github.com:llvm-mirror/clang.git
5e7180b8436993360d97b8d749f75cbdcc3967c4) (git at github.com: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>
>::__push_back_slow_path<clang::FixItHint>(clang::FixItHint&&) + 62629
5  clang                    0x000000010dc2567e void
std::__1::vector<clang::FixItHint, std::__1::allocator<clang::FixItHint>
>::__push_back_slow_path<clang::FixItHint>(clang::FixItHint&&) + 37214
6  clang                    0x000000010dc2fb87 void
std::__1::vector<clang::FixItHint, std::__1::allocator<clang::FixItHint>
>::__push_back_slow_path<clang::FixItHint>(clang::FixItHint&&) + 79463
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>
>::__push_back_slow_path<clang::CodeGen::LValue const&>(clang::CodeGen::LValue
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>
>::__push_back_slow_path<clang::CodeGen::LValue const&>(clang::CodeGen::LValue
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> >
>::destroy(std::__1::__tree_node<std::__1::__value_type<clang::edit::FileOffset,
clang::edit::EditedSource::FileEdit>, void*>*) + 5694
23 clang                    0x000000010d598023 void
std::__1::vector<clang::FrontendInputFile,
std::__1::allocator<clang::FrontendInputFile>
>::__push_back_slow_path<clang::FrontendInputFile
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>
>::__push_back_slow_path<llvm::SourceMgr::SrcBuffer>(llvm::SourceMgr::SrcBuffer&&)
+ 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 (git at github.com:llvm-mirror/clang.git
5e7180b8436993360d97b8d749f75cbdcc3967c4) (git at github.com: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
http://llvm.org/bugs/ 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:

********************

-- 
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/20141108/2838265b/attachment.html>


More information about the llvm-bugs mailing list