Compiler crash
stepanhruda opened this issue · 1 comments
stepanhruda commented
I get a compiler crash when using Venice. Oddly enough it only happens if I use it through Xcode (launched with latest Swift toolchain). swift build
works fine on both Linux and OS X.
I can investigate this further, but I want to make sure you're not aware of it and I'm not wasting time, since there is already so much yak shaving involved with Swift development.
Assertion failed: (offset >= NextOffset && "adding fields out of order"), function addField, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/IRGen/GenStruct.cpp, line 669.
0 swift 0x0000000103d4ea0b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1 swift 0x0000000103d4dcc6 llvm::sys::RunSignalHandlers() + 70
2 swift 0x0000000103d4f0b2 SignalHandler(int) + 322
3 libsystem_platform.dylib 0x00007fff97ec1eaa _sigtramp + 26
4 swift 0x00000001047aac15 FirstTarget + 71405
5 swift 0x0000000103d4eec6 abort + 22
6 swift 0x0000000103d4eea1 __assert_rtn + 81
7 swift 0x00000001017424e0 (anonymous namespace)::ClangRecordLowering::addField(swift::VarDecl*, swift::irgen::Size, swift::irgen::LoadableTypeInfo const&) + 592
8 swift 0x00000001017418bb swift::irgen::TypeConverter::convertStructType(swift::TypeBase*, swift::CanType, swift::StructDecl*) + 3883
9 swift 0x0000000101750a23 swift::irgen::TypeConverter::convertAnyNominalType(swift::CanType, swift::NominalTypeDecl*) + 371
10 swift 0x0000000101750044 swift::irgen::TypeConverter::convertType(swift::CanType) + 308
11 swift 0x000000010174f256 swift::irgen::TypeConverter::getTypeEntry(swift::CanType) + 438
12 swift 0x000000010174ec9e swift::irgen::IRGenModule::getTypeInfo(swift::SILType) + 46
13 swift 0x0000000101741868 swift::irgen::TypeConverter::convertStructType(swift::TypeBase*, swift::CanType, swift::StructDecl*) + 3800
14 swift 0x0000000101750a23 swift::irgen::TypeConverter::convertAnyNominalType(swift::CanType, swift::NominalTypeDecl*) + 371
15 swift 0x0000000101750044 swift::irgen::TypeConverter::convertType(swift::CanType) + 308
16 swift 0x000000010174f256 swift::irgen::TypeConverter::getTypeEntry(swift::CanType) + 438
17 swift 0x000000010174ec10 swift::irgen::IRGenModule::getTypeInfoForLowered(swift::CanType) + 16
18 swift 0x00000001016e1a01 swift::irgen::getTypeMetadataAccessStrategy(swift::irgen::IRGenModule&, swift::CanType, bool) + 241
19 swift 0x00000001016e1e97 swift::irgen::IRGenFunction::emitTypeMetadataRef(swift::CanType) + 39
20 swift 0x00000001016efff3 emitNominalMetadataRef(swift::irgen::IRGenFunction&, swift::NominalTypeDecl*, swift::CanType) + 899
21 swift 0x00000001016ee4d9 llvm::Value* swift::CanTypeVisitor<(anonymous namespace)::EmitTypeMetadataRef, llvm::Value*>::visit<>(swift::CanType) + 345
22 swift 0x00000001016f1129 llvm::Value* llvm::function_ref<llvm::Value* (swift::irgen::IRGenFunction&)>::callback_fn<getTypeMetadataAccessFunction(swift::irgen::IRGenModule&, swift::CanType, swift::ForDefinition_t)::$_1>(long, swift::irgen::IRGenFunction&) + 489
23 swift 0x00000001016e1d32 swift::irgen::emitLazyCacheAccessFunction(swift::irgen::IRGenModule&, llvm::Function*, llvm::GlobalVariable*, llvm::function_ref<llvm::Value* (swift::irgen::IRGenFunction&)> const&) + 626
24 swift 0x00000001016f0ed0 getTypeMetadataAccessFunction(swift::irgen::IRGenModule&, swift::CanType, swift::ForDefinition_t) + 192
25 swift 0x00000001016e1f34 emitCallToTypeMetadataAccessFunction(swift::irgen::IRGenFunction&, swift::CanType, swift::ForDefinition_t) + 68
26 swift 0x00000001016e3e5a swift::irgen::emitFieldTypeAccessor(swift::irgen::IRGenModule&, swift::NominalTypeDecl*, llvm::Function*, llvm::ArrayRef<swift::irgen::FieldTypeInfo>) + 2250
27 swift 0x00000001016b6831 swift::irgen::IRGenModuleDispatcher::emitLazyDefinitions() + 865
28 swift 0x0000000101759468 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 1368
29 swift 0x0000000101759906 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 70
30 swift 0x000000010161f437 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 15447
31 swift 0x000000010161abda frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2794
32 swift 0x00000001016161a7 main + 2855
33 libdyld.dylib 0x00007fff8ba8c5ad start + 1
34 libdyld.dylib 0x0000000000000060 start + 1951873716
Stack dump:
// Omitted for readability
1. While converting type 'mill_chan' (declared at [<invalid loc> - <invalid loc>])
2. While converting type 'mill_ep' (declared at [<invalid loc> - <invalid loc>])
paulofaria commented
We haven't tried Venice with Xcode. If you're willing to investigate further we'd be very happy. Thanks, and merry christmas! (: