[LLVMbugs] [Bug 11558] New: Crash in ActOnExplicitInstantiation(): "point of instantiation must be valid!"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 13 12:58:21 PST 2011


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

             Bug #: 11558
           Summary: Crash in ActOnExplicitInstantiation(): "point of
                    instantiation must be valid!"
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


tests-MacBook-Pro-2:delta test$ cat repro.ii
namespace std {

template<typename _CharT>
class basic_string;

typedef basic_string<char> string;

template <typename STRING_TYPE> class BasicStringPiece;

template <> class BasicStringPiece<std::string> {
};

extern template class BasicStringPiece<std::string>;
template class BasicStringPiece<std::string>;

}  // namespace std
tests-MacBook-Pro-2:delta test$ gcc -x c++ -c repro.ii
tests-MacBook-Pro-2:delta test$
~/src/chrome-git/src/third_party/llvm-build/Release+Asserts/bin/clang -x c++ -c
repro.ii
Assertion failed: (Loc.isValid() && "point of instantiation must be valid!"),
function setPointOfInstantiation, file
/Volumes/MacintoshHD2/src/chrome-git/src/third_party/llvm/tools/clang/lib/Sema/../../include/clang/AST/DeclTemplate.h,
line 1416.
0  clang             0x00000001014c9ac2 _ZL15PrintStackTracePv + 34
1  clang             0x00000001014c9ff9 _ZL13SignalHandleri + 713
2  libsystem_c.dylib 0x00007fff8b0ffcfa _sigtramp + 26
3  clang             0x00000001002eb2ea clang::Parser::ParseTemplateArgument()
+ 138
4  clang             0x00000001000441e6 abort + 22
5  clang             0x0000000100044238 __assert_rtn + 56
6  clang             0x0000000100503cf5
clang::Sema::ActOnExplicitInstantiation(clang::Scope*, clang::SourceLocation,
clang::SourceLocation, unsigned int, clang::SourceLocation, clang::CXXScopeSpec
const&, clang::OpaquePtr<clang::TemplateName>, clang::SourceLocation,
clang::SourceLocation, clang::ASTTemplateArgsPtr, clang::SourceLocation,
clang::AttributeList*) + 2119
7  clang             0x00000001002c0ee8
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, bool) + 2710
8  clang             0x00000001002b3e5e
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 6218
9  clang             0x00000001002ed4b5
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier, clang::AttributeList*) + 717
10 clang             0x00000001002ea15d
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 429
11 clang             0x00000001002b6fc3
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 381
12 clang             0x00000001002f723e
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1776
13 clang             0x00000001002c287a
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::ParsedAttributes&, clang::Parser::BalancedDelimiterTracker&) + 256
14 clang             0x00000001002b861b clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 3323
15 clang             0x00000001002b706b
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 549
16 clang             0x00000001002f723e
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1776
17 clang             0x00000001002f7d6e
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 262
18 clang             0x00000001002a3175 clang::ParseAST(clang::Sema&, bool) +
325
19 clang             0x000000010026f2cc clang::CodeGenAction::ExecuteAction() +
924
20 clang             0x0000000100065a96
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 962
21 clang             0x000000010004da31
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2161
22 clang             0x0000000100047acb cc1_main(char const**, char const**,
char const*, void*) + 2923
23 clang             0x000000010004aab0 main + 640
24 clang             0x0000000100046f4c start + 52
25 clang             0x000000000000002f start + 18446744069414293783
Stack dump:
0.    Program arguments:
/Users/test/src/chrome-git/src/third_party/llvm-build/Release+Asserts/bin/clang
-cc1 -triple x86_64-apple-macosx10.7.2 -emit-obj -mrelax-all -disable-free
-main-file-name repro.ii -pic-level 1 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 97.17 -coverage-file
repro.o -resource-dir
/Users/test/src/chrome-git/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.1
-fmodule-cache-path
/var/folders/5j/6xp_dl050mv_b_0_56s5mjx80000gn/T/clang-module-cache
-fdeprecated-macro -fdebug-compilation-dir /Users/test/src/delta -ferror-limit
19 -fmessage-length 267 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-dispatch-method=mixed
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
repro.o -x c++ repro.ii 
1.    repro.ii:14:45: current parser token ';'
2.    repro.ii:1:1: parsing namespace 'std'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg:
/var/folders/5j/6xp_dl050mv_b_0_56s5mjx80000gn/T/repro-VirH75.ii
clang: note: diagnostic msg:
/var/folders/5j/6xp_dl050mv_b_0_56s5mjx80000gn/T/repro-VirH75.sh

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list