[LLVMbugs] [Bug 15290] New: Segmentation fault during template instantiation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Feb 16 15:32:03 PST 2013


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

            Bug ID: 15290
           Summary: Segmentation fault during template instantiation
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: other
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ariane at stack.nl
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10030
  --> http://llvm.org/bugs/attachment.cgi?id=10030&action=edit
Reduced code triggering segmentation fault.

When invoking (using attached fail.ii):

/usr/bin/clang-3.3 -cc1 -triple amd64-unknown-bitrig0.1 -emit-obj -std=c++11 -x
c++ -o /dev/null fail.ii

the compiler fails with:

Stack dump:
0.      Program arguments: /usr/bin/clang-3.3 -cc1 -triple
amd64-unknown-bitrig0.1 -emit-obj -std=c++11 -x c++ -o /dev/null fail.ii 
1.      <eof> parser at end of file
2.      fail.ii:55:2: instantiating function definition '~refpointer'
3.      fail.ii:41:2: instantiating function definition 'release'
Segmentation fault (core dumped)


The code has been reduced, so the compiler will spew a couple of errors.

I had the error first on maxosx, but reproduced it on bitrig (a fork of
openbsd).  The llvm-3.3 I'm using is was compiled at Dec 3.  For macosx, I
first found the error in their 3.2svn version, another maxosx with a 3.1svn
reproduced this; the previous compiler which was also based on 3.1 did not have
this problem, leading me to believe it was introduced somewhere between 3.1 and
3.2 release.


Stack trace:

#0  0x000000000112a34d in
clang::Sema::CheckDerivedToBaseConversion(clang::QualType, clang::QualType,
unsigned int, unsigned int, clang::SourceLocation, clang::SourceRange,
clang::DeclarationName, llvm::SmallVector<clang::CXXBaseSpecifier*, 4u>*) ()
No symbol table info available.
#1  0x000000000112a8db in
clang::Sema::CheckDerivedToBaseConversion(clang::QualType, clang::QualType,
clang::SourceLocation, clang::SourceRange,
llvm::SmallVector<clang::CXXBaseSpecifier*, 4u>*, bool) ()
No symbol table info available.
#2  0x0000000001174685 in
clang::Sema::PerformObjectMemberConversion(clang::Expr*,
clang::NestedNameSpecifier*, clang::NamedDecl*, clang::NamedDecl*) ()
No symbol table info available.
#3  0x00000000011cfe50 in BuildFieldReferenceExpr(clang::Sema&, clang::Expr*,
bool, clang::CXXScopeSpec const&, clang::FieldDecl*, clang::DeclAccessPair,
clang::DeclarationNameInfo const&) ()
No symbol table info available.
#4  0x00000000011cf39d in clang::Sema::BuildMemberReferenceExpr(clang::Expr*,
clang::QualType, clang::SourceLocation, bool, clang::CXXScopeSpec const&,
clang::SourceLocation, clang::NamedDecl*, clang::LookupResult&,
clang::TemplateArgumentListInfo const*, bool,
clang::Sema::ActOnMemberAccessExtraArgs*) ()
No symbol table info available.
#5  0x00000000012bf0b7 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) ()
No symbol table info available.
#6  0x00000000012c5574 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*) ()
No symbol table info available.
#7  0x00000000012b798a in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) ()
No symbol table info available.
#8  0x00000000012b8348 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) ()
No symbol table info available.
#9  0x00000000012c407d in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformBinaryOperator(clang::BinaryOperator*)
()
No symbol table info available.
#10 0x00000000012b7938 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) ()
No symbol table info available.
#11 0x00000000012c407d in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformBinaryOperator(clang::BinaryOperator*)
()
No symbol table info available.
#12 0x00000000012b7938 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) ()
No symbol table info available.
#13 0x00000000012b7805 in clang::Sema::SubstExpr(clang::Expr*,
clang::MultiLevelTemplateArgumentList const&) ()
No symbol table info available.
#14 0x00000000012d0f50 in InstantiateExceptionSpec(clang::Sema&,
clang::FunctionDecl*, clang::FunctionProtoType const*,
clang::MultiLevelTemplateArgumentList const&) ()
No symbol table info available.
#15 0x00000000012d08a8 in
clang::Sema::InstantiateExceptionSpec(clang::SourceLocation,
clang::FunctionDecl*) ()
No symbol table info available.
#16 0x00000000011668bb in
clang::Sema::ResolveExceptionSpec(clang::SourceLocation,
clang::FunctionProtoType const*) ()
No symbol table info available.
#17 0x000000000117b166 in
clang::Sema::MarkFunctionReferenced(clang::SourceLocation,
clang::FunctionDecl*)
    ()
No symbol table info available.
#18 0x000000000122db68 in clang::FinishOverloadedCallExpr(clang::Sema&,
clang::Scope*, clang::Expr*, clang::UnresolvedLookupExpr*,
clang::SourceLocation, clang::Expr**, unsigned int, clang::SourceLocation,
clang::Expr*, clang::OverloadCandidateSet*, clang::OverloadCandidate**,
clang::OverloadingResult, bool) ()
No symbol table info available.
#19 0x000000000122daa3 in clang::Sema::BuildOverloadedCallExpr(clang::Scope*,
clang::Expr*, clang::UnresolvedLookupExpr*, clang::SourceLocation,
clang::Expr**, unsigned int, clang::SourceLocation, clang::Expr*, bool) ()
No symbol table info available.
#20 0x000000000116ef83 in clang::Sema::ActOnCallExpr(clang::Scope*,
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) ()
No symbol table info available.
#21 0x00000000012c5631 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*) ()
No symbol table info available.
#22 0x00000000012b798a in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) ()
No symbol table info available.
#23 0x00000000012b5d1f in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*) ()
No symbol table info available.
#24 0x00000000012c45ac in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCompoundStmt(clang::CompoundStmt*,
bool) ()
No symbol table info available.
#25 0x00000000012b5c35 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformStmt(clang::Stmt*) ()
No symbol table info available.
#26 0x00000000012b55a5 in clang::Sema::SubstStmt(clang::Stmt*,
clang::MultiLevelTemplateArgumentList const&) ()
No symbol table info available.
#27 0x00000000012d15cf in
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) ()
No symbol table info available.
#28 0x00000000012d22e8 in clang::Sema::PerformPendingInstantiations(bool) ()
No symbol table info available.
#29 0x00000000012d1740 in
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) ()
No symbol table info available.
#30 0x00000000012d22e8 in clang::Sema::PerformPendingInstantiations(bool) ()
No symbol table info available.
#31 0x000000000107aa50 in clang::Sema::ActOnEndOfTranslationUnit() ()
No symbol table info available.
#32 0x0000000000e928b4 in
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) ()
No symbol table info available.
#33 0x0000000000e8f785 in clang::ParseAST(clang::Sema&, bool, bool) ()
No symbol table info available.
#34 0x0000000000c7378a in clang::CodeGenAction::ExecuteAction() ()
No symbol table info available.
#35 0x0000000000dfdac6 in clang::FrontendAction::Execute() ()
No symbol table info available.
#36 0x0000000000de0da2 in
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) ()
No symbol table info available.
#37 0x0000000000c5f92c in
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) ()
No symbol table info available.
#38 0x000000000043599b in cc1_main(char const**, char const**, char const*,
void*) ()
No symbol table info available.
#39 0x0000000000432a3f in main ()

-- 
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/20130216/b6d80a20/attachment.html>


More information about the llvm-bugs mailing list