[LLVMbugs] [Bug 22317] New: clang 3.5 crashes in clang::TryImplicitConversion

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 23 15:14:36 PST 2015


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

            Bug ID: 22317
           Summary: clang 3.5 crashes in clang::TryImplicitConversion
           Product: clang
           Version: 3.5
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: floooh at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Since emscripten switched to clang 3.5 from 3.4 I'm getting intermittent
crashes when compiling a specific C++ file, the crash seems to happen much more
often when running make with more then 3 or 4 build jobs.

Console output with callstack (also see the 2 attached files)

[ 44%] Building CXX object code/Modules/IO/CMakeFiles/IO.dir/FS/ioLane.cc.o
0  clang-3.5                0x00000001070e1028
llvm::sys::PrintStackTrace(__sFILE*) + 40
1  clang-3.5                0x00000001070e1504 SignalHandler(int) + 452
2  libsystem_platform.dylib 0x00007fff8bc2df1a _sigtramp + 26
3  libsystem_platform.dylib 0x0000000000000003 _sigtramp + 1950163203
4  clang-3.5                0x0000000107c49c12
clang::TryImplicitConversion(clang::Sema&, clang::Expr*, clang::QualType, bool,
bool, bool, bool, bool, bool) + 114
5  clang-3.5                0x0000000107c55247
clang::TryCopyInitialization(clang::Sema&, clang::Expr*, clang::QualType, bool,
bool, bool, bool) + 215
6  clang-3.5                0x0000000107c54af7
clang::Sema::AddOverloadCandidate(clang::FunctionDecl*, clang::DeclAccessPair,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool, bool, bool) +
1687
7  clang-3.5                0x0000000107c55f1c
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool) + 556
8  clang-3.5                0x0000000107c0754d
ResolveConstructorOverload(clang::Sema&, clang::SourceLocation,
llvm::MutableArrayRef<clang::Expr*>, clang::OverloadCandidateSet&,
llvm::ArrayRef<clang::NamedDecl*>, clang::OverloadCandidate*&, bool, bool,
bool, bool) + 349
9  clang-3.5                0x0000000107bef3a7
TryConstructorInitialization(clang::Sema&, clang::InitializedEntity const&,
clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>,
clang::QualType, clang::InitializationSequence&, bool) + 839
10 clang-3.5                0x0000000107becdd5
clang::InitializationSequence::InitializeFrom(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, bool) + 2101
11 clang-3.5                0x0000000107bedf46
clang::InitializationSequence::InitializationSequence(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
llvm::MutableArrayRef<clang::Expr*>, bool) + 438
12 clang-3.5                0x0000000107bbce6b
clang::Sema::BuildTypeTrait(clang::TypeTrait, clang::SourceLocation,
llvm::ArrayRef<clang::TypeSourceInfo*>, clang::SourceLocation) + 2603
13 clang-3.5                0x0000000107d22419 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTypeTraitExpr(clang::TypeTraitExpr*)
+ 2681
14 clang-3.5                0x0000000107d14098 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) + 2664
15 clang-3.5                0x0000000107d17fab clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&) + 267
16 clang-3.5                0x0000000107d18d55 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName) + 933
17 clang-3.5                0x0000000107d0cac1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) + 6401
18 clang-3.5                0x0000000107d0af21 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) + 209
19 clang-3.5                0x0000000107d107a9
clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&) + 761
20 clang-3.5                0x0000000107d10e99
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 745
21 clang-3.5                0x0000000107d126c5
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 1813
22 clang-3.5                0x0000000107d60177
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 567
23 clang-3.5                0x0000000107d5fe65
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 21
24 clang-3.5                0x00000001079fe7e1
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) + 337
25 clang-3.5                0x0000000107b54fca
clang::Sema::BuildQualifiedDeclarationNameExpr(clang::CXXScopeSpec&,
clang::DeclarationNameInfo const&, bool, clang::TypeSourceInfo**) + 106
26 clang-3.5                0x0000000107d22982 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentScopeDeclRefExpr(clang::DependentScopeDeclRefExpr*,
bool, clang::TypeSourceInfo**) + 562
27 clang-3.5                0x0000000107d13ace clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) + 1182
28 clang-3.5                0x0000000107d17fab clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument(clang::TemplateArgumentLoc
const&, clang::TemplateArgumentLoc&) + 267
29 clang-3.5                0x0000000107d18d55 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType(clang::TypeLocBuilder&,
clang::TemplateSpecializationTypeLoc, clang::TemplateName) + 933
30 clang-3.5                0x0000000107d0cac1 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) + 6401
31 clang-3.5                0x0000000107d0af21 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) + 209
32 clang-3.5                0x0000000107d107a9
clang::Sema::SubstBaseSpecifiers(clang::CXXRecordDecl*, clang::CXXRecordDecl*,
clang::MultiLevelTemplateArgumentList const&) + 761
33 clang-3.5                0x0000000107d10e99
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 745
34 clang-3.5                0x0000000107d126c5
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 1813
35 clang-3.5                0x0000000107d60177
clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 567
36 clang-3.5                0x0000000107d5fe65
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::Sema::TypeDiagnoser&) + 21
37 clang-3.5                0x00000001079fe7e1
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) + 337
38 clang-3.5                0x0000000107b54fca
clang::Sema::BuildQualifiedDeclarationNameExpr(clang::CXXScopeSpec&,
clang::DeclarationNameInfo const&, bool, clang::TypeSourceInfo**) + 106
39 clang-3.5                0x0000000107d22982 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentScopeDeclRefExpr(clang::DependentScopeDeclRefExpr*,
bool, clang::TypeSourceInfo**) + 562
40 clang-3.5                0x0000000107d13ace clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) + 1182
41 clang-3.5                0x0000000107d212c6 clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformParenExpr(clang::ParenExpr*) + 22
42 clang-3.5                0x0000000107d13e9e clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) + 2158
43 clang-3.5                0x0000000107d13617
clang::Sema::SubstExpr(clang::Expr*, clang::MultiLevelTemplateArgumentList
const&) + 71
44 clang-3.5                0x0000000107d37727
InstantiateExceptionSpec(clang::Sema&, clang::FunctionDecl*,
clang::FunctionProtoType const*, clang::MultiLevelTemplateArgumentList const&)
+ 1399
45 clang-3.5                0x0000000107d36fde
clang::Sema::InstantiateExceptionSpec(clang::SourceLocation,
clang::FunctionDecl*) + 606
46 clang-3.5                0x0000000107b448df
clang::Sema::ResolveExceptionSpec(clang::SourceLocation,
clang::FunctionProtoType const*) + 127
47 clang-3.5                0x0000000107b60b32
clang::Sema::MarkFunctionReferenced(clang::SourceLocation,
clang::FunctionDecl*) + 1346
48 clang-3.5                0x0000000107b00c88
clang::Sema::BuildCXXConstructExpr(clang::SourceLocation, clang::QualType,
clang::CXXConstructorDecl*, llvm::MutableArrayRef<clang::Expr*>, bool, bool,
bool, bool, unsigned int, clang::SourceRange) + 264
49 clang-3.5                0x0000000107bf99da
PerformConstructorInitialization(clang::Sema&, clang::InitializedEntity const&,
clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>,
clang::InitializationSequence::Step const&, bool&, bool, bool,
clang::SourceLocation, clang::SourceLocation) + 1130
50 clang-3.5                0x0000000107bf18d7
clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, llvm::MutableArrayRef<clang::Expr*>,
clang::QualType*) + 5767
51 clang-3.5                0x0000000107ae0785
clang::Sema::BuildMemberInitializer(clang::ValueDecl*, clang::Expr*,
clang::SourceLocation) + 821
52 clang-3.5                0x0000000107d38a3d
clang::Sema::InstantiateMemInitializers(clang::CXXConstructorDecl*,
clang::CXXConstructorDecl const*, clang::MultiLevelTemplateArgumentList const&)
+ 925
53 clang-3.5                0x0000000107d380aa
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2106
54 clang-3.5                0x0000000107d38f95
clang::Sema::PerformPendingInstantiations(bool) + 437
55 clang-3.5                0x0000000107d38287
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2583
56 clang-3.5                0x0000000107d38f95
clang::Sema::PerformPendingInstantiations(bool) + 437
57 clang-3.5                0x00000001079ec00f
clang::Sema::ActOnEndOfTranslationUnit() + 527
58 clang-3.5                0x00000001078d9bfc
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 172
59 clang-3.5                0x00000001078654b6 clang::ParseAST(clang::Sema&,
bool, bool) + 390
60 clang-3.5                0x00000001075b15d1
clang::CodeGenAction::ExecuteAction() + 81
61 clang-3.5                0x00000001072ae2ee clang::FrontendAction::Execute()
+ 62
62 clang-3.5                0x0000000107285053
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 867
63 clang-3.5                0x00000001072e273c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4140
64 clang-3.5                0x0000000106a2a5dd cc1_main(char const**, char
const**, char const*, void*) + 797
65 clang-3.5                0x0000000106a275b8 main + 1128
66 libdyld.dylib            0x00007fff8d6fd5c9 start + 1
Stack dump:
0.    Program arguments:
/Users/floh/projects/fips-sdks/osx/emsdk_portable/clang/fastcomp/build_incoming_64/bin/clang-3.5
-cc1 -triple asmjs-unknown-emscripten -emit-llvm-bc -disable-free
-disable-llvm-verifier -main-file-name ioLane.cc -mrelocation-model static
-mdisable-fp-elim -no-integrated-as -mconstructor-aliases -dwarf-column-info
-coverage-file
/Users/floh/projects/fips-build/oryol/emsc-make-release/code/Modules/IO/CMakeFiles/IO.dir/FS/ioLane.cc.o
-nostdsysteminc -nobuiltininc -resource-dir
/Users/floh/projects/fips-sdks/osx/emsdk_portable/clang/fastcomp/build_incoming_64/bin/../lib/clang/3.5.0
-D __EMSCRIPTEN_major__=1 -D __EMSCRIPTEN_minor__=29 -D __EMSCRIPTEN_tiny__=6
-D GLM_FORCE_RADIANS=1 -D ORYOL_EMSCRIPTEN=1 -D ORYOL_NO_ASSERT=1 -D
ORYOL_OPENGL=1 -D ORYOL_OPENGLES2=1 -D ORYOL_POSIX=1 -D
ORYOL_SAMPLE_URL="http://localhost/" -D NDEBUG -I
/Users/floh/projects/oryol/code -I /Users/floh/projects/oryol/code/Modules -I
/Users/floh/projects/oryol/code/Ext -I /Users/floh/projects/fips-unittestpp/.
-I /Users/floh/projects/gliml/. -I /Users/floh/projects/fips-zlib/. -I
/Users/floh/projects/fips-glm/glm -I
/Users/floh/projects/fips-glfw/glfw/include -I
/Users/floh/projects/fips-libcurl/. -stdlib=libc++ -O3
-Werror=implicit-function-declaration -Wall -Wno-multichar -Wextra
-Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers
-Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings
-Wno-unused-volatile-lvalue -std=c++11 -fdeprecated-macro
-fno-dwarf-directory-asm -fdebug-compilation-dir
/Users/floh/projects/fips-build/oryol/emsc-make-release/code/Modules/IO
-ferror-limit 19 -fmessage-length 116 -mstackrealign -fobjc-runtime=gnustep
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-nobuiltininc -nostdsysteminc
-isystem/Users/floh/projects/fips-sdks/osx/emsdk_portable/emscripten/incoming/system/local/include
-isystem/Users/floh/projects/fips-sdks/osx/emsdk_portable/emscripten/incoming/system/include/compat
-isystem/Users/floh/projects/fips-sdks/osx/emsdk_portable/emscripten/incoming/system/include
-isystem/Users/floh/projects/fips-sdks/osx/emsdk_portable/emscripten/incoming/system/include/emscripten
-isystem/Users/floh/projects/fips-sdks/osx/emsdk_portable/emscripten/incoming/system/include/libc
-isystem/Users/floh/projects/fips-sdks/osx/emsdk_portable/emscripten/incoming/system/lib/libc/musl/arch/js
-isystem/Users/floh/projects/fips-sdks/osx/emsdk_portable/emscripten/incoming/system/include/libcxx
-isystem/Users/floh/projects/fips-sdks/osx/emsdk_portable/emscripten/incoming/system/include/SDL
-disable-llvm-optzns -o CMakeFiles/IO.dir/FS/ioLane.cc.o -x c++
/Users/floh/projects/oryol/code/Modules/IO/FS/ioLane.cc
1.    <eof> parser at end of file
2.   
/Users/floh/projects/fips-sdks/osx/emsdk_portable/emscripten/incoming/system/include/libcxx/functional:2184:1:
instantiating function definition 'bind'
3.   
/Users/floh/projects/fips-sdks/osx/emsdk_portable/emscripten/incoming/system/include/libcxx/functional:2077:16:
instantiating function definition '__bind'
clang-3.5: error: unable to execute command: Segmentation fault: 11
clang-3.5: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5.0
Target: asmjs-unknown-emscripten
Thread model: posix
clang-3.5: 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-3.5: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.5: note: diagnostic msg:
/var/folders/_v/kn9t9hrj3kb7kjxckv3zh3hm0000gn/T/ioLane-a76809.cpp
clang-3.5: note: diagnostic msg:
/var/folders/_v/kn9t9hrj3kb7kjxckv3zh3hm0000gn/T/ioLane-a76809.sh
clang-3.5: note: diagnostic msg:

********************
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting

-- 
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/20150123/6f0d4d2d/attachment.html>


More information about the llvm-bugs mailing list