[LLVMbugs] [Bug 15144] New: clang 3.0 SIGSEGV on Ubuntu 12.10 while compiling libc++

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Feb 3 09:26:59 PST 2013


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

             Bug #: 15144
           Summary: clang 3.0 SIGSEGV on Ubuntu 12.10 while compiling
                    libc++
           Product: clang
           Version: 3.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bobby.prani at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9959
  --> http://llvm.org/bugs/attachment.cgi?id=9959
preprocessed sources

Clang 3.0 on Ubuntu seg-faults while compile libc++. 

pranith at evgadesktop:~/devops/libcpp/build$ make
[  3%] Generating include/cxxabi.h
[  6%] Generating include/bits/c++config.h
[ 10%] Generating include/bits/os_defines.h
[ 13%] Generating include/bits/cpu_defines.h
[ 16%] Generating include/bits/cxxabi_tweaks.h
[ 20%] Generating include/bits/cxxabi_forced.h
[ 20%] Built target supcxx_headers
[ 23%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/valarray.cpp.o
In file included from /home/pranith/devops/libcpp/libcxx/src/valarray.cpp:10:
In file included from /home/pranith/devops/libcpp/libcxx/include/valarray:347:
/home/pranith/devops/libcpp/libcxx/include/functional:1115:47: error: function
cannot return function type 'type-parameter-0-0 (type-parameter-0-1...)'
    template <class _Fp, bool = !is_same<_Fp, function>::value &&
                                              ^
/home/pranith/devops/libcpp/libcxx/include/functional:1142:35: note: in
instantiation of default argument for '__callable<type-parameter-1-0>' required
here
               typename enable_if<__callable<_Fp>::value>::type* = 0);
                                  ^~~~~~~~~~~~~~~
0  libLLVM-3.0.so.1 0x00002b155d40c66f
1  libLLVM-3.0.so.1 0x00002b155d40cad9
2  libpthread.so.0  0x00002b155dd4ccb0
3  clang            0x0000000000a572f5
clang::Sema::FindInstantiatedDecl(clang::SourceLocation, clang::NamedDecl*,
clang::MultiLevelTemplateArgumentList const&) + 485
4  clang            0x0000000000a30cc3
5  clang            0x0000000000a3df26
6  clang            0x0000000000a40f5c
7  clang            0x0000000000a35b35
8  clang            0x0000000000a39c65
9  clang            0x0000000000a3b0b0
10 clang            0x0000000000a3f8d8
11 clang            0x0000000000a41943
12 clang            0x0000000000a45092
13 clang            0x0000000000a456b6
14 clang            0x0000000000a4a372
15 clang            0x0000000000a44c87
16 clang            0x0000000000a5155d clang::Sema::SubstExpr(clang::Expr*,
clang::MultiLevelTemplateArgumentList const&) + 45
17 clang            0x00000000009d6934
18 clang            0x00000000009ef099
clang::Sema::CheckTemplateArgumentList(clang::TemplateDecl*,
clang::SourceLocation, clang::TemplateArgumentListInfo&, bool,
llvm::SmallVectorImpl<clang::TemplateArgument>&) + 2953
19 clang            0x00000000009f0565
clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation,
clang::TemplateArgumentListInfo&) + 261
20 clang            0x0000000000846b50
clang::Sema::ActOnCXXNestedNameSpecifier(clang::Scope*, clang::SourceLocation,
clang::CXXScopeSpec&, clang::OpaquePtr<clang::TemplateName>,
clang::SourceLocation, clang::SourceLocation, clang::ASTTemplateArgsPtr,
clang::SourceLocation, clang::SourceLocation, bool) + 272
21 clang            0x000000000081bb0e
clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&,
clang::OpaquePtr<clang::QualType>, bool, bool*, bool) + 5118
22 clang            0x00000000007e65c9
clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) + 665
23 clang            0x00000000007db316
clang::Parser::isCXXDeclarationSpecifier() + 134
24 clang            0x00000000007dd13e
clang::Parser::isCXXTypeId(clang::Parser::TentativeCXXTypeIdContext, bool&) +
46
25 clang            0x00000000007d8040 clang::Parser::ParseTemplateArgument() +
32
26 clang            0x00000000007d9753
clang::Parser::ParseTemplateArgumentList(llvm::SmallVector<clang::ParsedTemplateArgument,
16u>&) + 51
27 clang            0x00000000007d9ae6
clang::Parser::ParseTemplateIdAfterTemplateName(clang::OpaquePtr<clang::TemplateName>,
clang::SourceLocation, clang::CXXScopeSpec const&, bool,
clang::SourceLocation&, llvm::SmallVector<clang::ParsedTemplateArgument, 16u>&,
clang::SourceLocation&) + 118
28 clang            0x00000000007da1ef
clang::Parser::AnnotateTemplateIdToken(clang::OpaquePtr<clang::TemplateName>,
clang::TemplateNameKind, clang::CXXScopeSpec&, clang::UnqualifiedId&,
clang::SourceLocation, bool) + 143
29 clang            0x000000000081b028
clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&,
clang::OpaquePtr<clang::QualType>, bool, bool*, bool) + 2328
30 clang            0x00000000007e64d5
clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) + 421
31 clang            0x00000000007f8692
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 4082
32 clang            0x00000000007fbe19
clang::Parser::ParseParameterDeclarationClause(clang::Declarator&,
clang::ParsedAttributes&, llvm::SmallVector<clang::DeclaratorChunk::ParamInfo,
16u>&, clang::SourceLocation&) + 713
33 clang            0x00000000007fce16
clang::Parser::ParseFunctionDeclarator(clang::Declarator&,
clang::ParsedAttributes&, clang::Parser::BalancedDelimiterTracker&, bool) +
1462
34 clang            0x00000000007fd64f
clang::Parser::ParseDirectDeclarator(clang::Declarator&) + 431
35 clang            0x00000000007f3de9
clang::Parser::ParseDeclaratorInternal(clang::Declarator&, void
(clang::Parser::*)(clang::Declarator&)) + 1001
36 clang            0x00000000007f47cf
clang::Parser::ParseDeclarator(clang::Declarator&) + 31
37 clang            0x000000000080568c
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject*) + 2812
38 clang            0x00000000007d4eb2
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier, clang::AttributeList*) + 3250
39 clang            0x00000000007d7c70
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 608
40 clang            0x00000000007d86a7
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 103
41 clang            0x0000000000805f49
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject*) + 5049
42 clang            0x0000000000807b9f
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 1855
43 clang            0x0000000000808f2b
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 3275
44 clang            0x00000000007f78f1
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 593
45 clang            0x00000000007d4505
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier, clang::AttributeList*) + 773
46 clang            0x00000000007d7c70
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 608
47 clang            0x00000000007d86a7
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 103
48 clang            0x00000000007f9ae4
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 596
49 clang            0x00000000007e483d
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1037
50 clang            0x00000000008032ef
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&) + 367
51 clang            0x000000000080403e clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 1854
52 clang            0x00000000007f9b11
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 641
53 clang            0x00000000007e4ff5
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 3013
54 clang            0x00000000008032ef
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&) + 367
55 clang            0x000000000080403e clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 1854
56 clang            0x00000000007f9b11
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 641
57 clang            0x00000000007e483d
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1037
58 clang            0x00000000007e5417
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 167
59 clang            0x00000000007bcbfd clang::ParseAST(clang::Sema&, bool) +
269
60 clang            0x00000000006a6253 clang::CodeGenAction::ExecuteAction() +
51
61 clang            0x00000000005adc7f
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 319
62 clang            0x000000000059653a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1114
63 clang            0x000000000058e1c4 cc1_main(char const**, char const**,
char const*, void*) + 820
64 clang            0x000000000058cb3c main + 620
65 libc.so.6        0x00002b155e49576d __libc_start_main + 237
66 clang            0x000000000058dd39
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -disable-free -disable-llvm-verifier -main-file-name valarray.cpp
-pic-level 2 -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.22
-momit-leaf-frame-pointer -coverage-file
CMakeFiles/cxx.dir/__/src/valarray.cpp.o -nostdinc++ -resource-dir
/usr/bin/../lib/clang/3.0 -D cxx_EXPORTS -D __GLIBCXX__ -D _DEBUG -D NDEBUG -U
NDEBUG -I /home/pranith/devops/libcpp/build/include -I
/home/pranith/devops/libcpp/libcxx/include -fmodule-cache-path
/var/tmp/clang-module-cache -I /opt/intel/composer_xe_2013.1.117/mkl/include -I
/opt/intel/composer_xe_2013.1.117/tbb/include -internal-isystem
/usr/local/include -internal-isystem /usr/bin/../lib/clang/3.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /usr/include -O3 -Wall -W -Wno-unused-parameter
-Wwrite-strings -Wno-long-long -pedantic -std=c++0x -fconst-strings
-fdeprecated-macro -ferror-limit 19 -fmessage-length 213 -fgnu-runtime
-fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
CMakeFiles/cxx.dir/__/src/valarray.cpp.o -x c++
/home/pranith/devops/libcpp/libcxx/src/valarray.cpp 
1.    /home/pranith/devops/libcpp/libcxx/include/functional:1142:52: current
parser token 'value'
2.    /home/pranith/devops/libcpp/libcxx/include/functional:473:1
<Spelling=/home/pranith/devops/libcpp/libcxx/include/__config:281:37>: parsing
namespace 'std'
3.    /home/pranith/devops/libcpp/libcxx/include/functional:473:1
<Spelling=/home/pranith/devops/libcpp/libcxx/include/__config:281:59>: parsing
namespace '__1'
4.    /home/pranith/devops/libcpp/libcxx/include/functional:1085:1: parsing
struct/union/class body 'function'
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal 2 (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) are located at:
clang: note: diagnostic msg: /tmp/valarray-xqzd9m.ii
make[2]: *** [lib/CMakeFiles/cxx.dir/__/src/valarray.cpp.o] Error 254
make[1]: *** [lib/CMakeFiles/cxx.dir/all] Error 2
make: *** [all] Error 2

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