[LLVMbugs] [Bug 16677] New: Crash on invalid: using a comma instead of closing angle bracket for template.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 22 17:45:51 PDT 2013


            Bug ID: 16677
           Summary: Crash on invalid: using a comma instead of closing
                    angle bracket for template.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rtrieu at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When the closing angle bracket is mistakenly replaced with a comma in the
following code, Clang crashes.  Needs -std=c++11 to reproduce.

class Class_With_Destructor {
  ~Class_With_Destructor() { }

template <class T>
class Base { };

template<class T,  // Should be angle bracket instead of comma
class Derived : public Base<T> {
  Class_With_Destructor member;

Stack trace:
0  clang           0x0000000001e0c563 llvm::sys::PrintStackTrace(_IO_FILE*) +
1  clang           0x0000000001e0c7ea
2  clang           0x0000000001e0c22e
3  libpthread.so.0 0x00007fb33614fcb0
4  clang           0x00000000022977e6
5  clang           0x000000000252134d
6  clang           0x0000000002525f12
clang::Sema::CXXSpecialMember, bool, bool, bool, bool, bool) + 110
7  clang           0x00000000023a510b
8  clang           0x00000000023a5586
9  clang           0x00000000023a5690
10 clang           0x00000000023a66b1
clang::Sema::CXXSpecialMember, bool) + 1513
11 clang           0x00000000023b2f0d
clang::Sema::DeclareImplicitDestructor(clang::CXXRecordDecl*) + 639
12 clang           0x00000000023a8abf
clang::Sema::AddImplicitlyDeclaredMembersToClass(clang::CXXRecordDecl*) + 599
13 clang           0x0000000002353af3 clang::Sema::ActOnFields(clang::Scope*,
clang::SourceLocation, clang::Decl*, llvm::ArrayRef<clang::Decl*>,
clang::SourceLocation, clang::SourceLocation, clang::AttributeList*) + 5663
14 clang           0x00000000023a883d
clang::SourceLocation, clang::Decl*, clang::SourceLocation,
clang::SourceLocation, clang::AttributeList*) + 411

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/20130723/29d4c3ab/attachment.html>

More information about the llvm-bugs mailing list