Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15962] Crash when compiling RealmSwift v10.22.0 #58223

Closed
nevil opened this issue Mar 11, 2022 · 1 comment
Closed

[SR-15962] Crash when compiling RealmSwift v10.22.0 #58223

nevil opened this issue Mar 11, 2022 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software duplicate Resolution: Duplicates another issue generics Feature: generic declarations and types swift 5.6 type checker Area → compiler: Semantic analysis

Comments

@nevil
Copy link

nevil commented Mar 11, 2022

Previous ID SR-15962
Radar None
Original Reporter @nevil
Type Bug
Status Resolved
Resolution Duplicate
Environment

Xcode 13.3 RC 13E113.
Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
macOS 12.2.1

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 64c15c7fc36e7c51b4924acca1c2fc65

duplicates:

  • SR-15792 error: Segmentation fault: 11 on compile of project

Issue Description:

There is a crash when compiling RealmSwift v10.22.0 using Xcode 13.3 RC
Xcode 13.3 RC 13E113.
Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)

Steps to reproduce:

Output:

Rewrite loops: {
}
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace.
Stack dump:
0.  Program arguments: /Applications/Xcode-13.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types /Users/h-anders/source/realm/realm-swift/RealmSwift/Aliases.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/AnyRealmValue.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/App.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/BSON.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Combine.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/CustomPersistable.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Decimal128.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/EmbeddedObject.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Error.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Impl/BasicTypes.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Impl/CollectionAccess.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Impl/ComplexTypes.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Impl/KeyPathStrings.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Impl/ObjcBridgeable.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Impl/Persistable.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Impl/PropertyAccessors.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Impl/RealmCollectionImpl.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Impl/SchemaDiscovery.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/LinkingObjects.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/List.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Map.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Migration.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/MongoClient.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/MutableSet.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Object.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/ObjectId.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/ObjectSchema.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/ObjectiveCSupport+AnyRealmValue.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/ObjectiveCSupport+BSON.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/ObjectiveCSupport+Sync.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/ObjectiveCSupport.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Optional.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/PersistedProperty.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Projection.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Property.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Query.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Realm.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/RealmCollection.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/RealmConfiguration.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/RealmKeyedCollection.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/RealmProperty.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Results.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Schema.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/SortDescriptor.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/SwiftUI.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Sync.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/SyncSubscription.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/ThreadSafeReference.swift /Users/h-anders/source/realm/realm-swift/RealmSwift/Util.swift -target arm64-apple-ios11.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode-13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk -I /Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Products/Debug-iphoneos -I /Applications/Xcode-13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib -F /Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Products/Debug-iphoneos/PackageFrameworks -F /Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Products/Debug-iphoneos/PackageFrameworks -F /Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Products/Debug-iphoneos/PackageFrameworks -F /Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Products/Debug-iphoneos -F /Applications/Xcode-13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F /Applications/Xcode-13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/h-anders/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 5 -enforce-exclusivity=checked -Onone -D SWIFT_PACKAGE -D DEBUG -D Xcode -new-driver-path /Applications/Xcode-13.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-driver -serialize-debugging-options -Xcc -working-directory -Xcc /Users/h-anders/source/realm/realm-swift -resource-dir /Applications/Xcode-13.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/Bid.modulemap -Xcc -I/Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Intermediates.noindex/Realm.build/Debug-iphoneos/RealmSwift.build/swift-overrides.hmap -Xcc -I/Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/SourcePackages/checkouts/realm-core/src/external/IntelRDFPMathLib20U2/LIBRARY/src -Xcc -I/Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/SourcePackages/checkouts/realm-core/src -Xcc -I/Users/h-anders/source/realm/realm-swift/include -Xcc -I/Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Products/Debug-iphoneos/include -Xcc -I/Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Intermediates.noindex/Realm.build/Debug-iphoneos/RealmSwift.build/DerivedSources-normal/arm64 -Xcc -I/Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Intermediates.noindex/Realm.build/Debug-iphoneos/RealmSwift.build/DerivedSources/arm64 -Xcc -I/Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Intermediates.noindex/Realm.build/Debug-iphoneos/RealmSwift.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG=1 -module-name RealmSwift -target-sdk-version 15.4 -emit-module-doc-path /Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Intermediates.noindex/Realm.build/Debug-iphoneos/RealmSwift.build/Objects-normal/arm64/RealmSwift.swiftdoc -emit-module-source-info-path /Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Intermediates.noindex/Realm.build/Debug-iphoneos/RealmSwift.build/Objects-normal/arm64/RealmSwift.swiftsourceinfo -emit-objc-header-path /Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Intermediates.noindex/Realm.build/Debug-iphoneos/RealmSwift.build/Objects-normal/arm64/RealmSwift-Swift.h -o /Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Intermediates.noindex/Realm.build/Debug-iphoneos/RealmSwift.build/Objects-normal/arm64/RealmSwift.swiftmodule -emit-abi-descriptor-path /Users/h-anders/Library/Developer/Xcode/DerivedData/realm-swift-djldlyaealpnpbdawfbfthdjaylw/Build/Intermediates.noindex/Realm.build/Debug-iphoneos/RealmSwift.build/Objects-normal/arm64/RealmSwift.abi.json
1.  Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
2.  Compiling with the current language version
3.  While evaluating request TypeCheckSourceFileRequest(source_file "/Users/h-anders/source/realm/realm-swift/RealmSwift/Query.swift")
4.  While type-checking extension of Query (at /Users/h-anders/source/realm/realm-swift/RealmSwift/Query.swift:523:1)
5.  While evaluating request RequirementRequest(extension of Query, 1, interface)
6.  While evaluating request ResolveTypeRequest(while resolving type , T.Element, (null))
7.  While building rewrite system for generic signature <τ_0_0 where τ_0_0 : RealmCollection, τ_0_0.Element : PersistableEnum, τ_0_0.Element.RawValue : RealmCollectionValue>
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  swift-frontend           0x000000010a2d7de7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1  swift-frontend           0x000000010a2d6e38 llvm::sys::RunSignalHandlers() + 248
2  swift-frontend           0x000000010a2d8440 SignalHandler(int) + 288
3  libsystem_platform.dylib 0x00007ff80713fe2d _sigtramp + 29
4  libsystem_platform.dylib 0x00007ff69bdb2c70 _sigtramp + 18446744067615698528
5  libsystem_c.dylib        0x00007ff807076d10 abort + 123
6  swift-frontend           0x0000000106519cfe swift::rewriting::RequirementMachine::computeCompletion(swift::rewriting::RewriteSystem::ValidityPolicy)::$_0::operator()() const + 142
7  swift-frontend           0x0000000106518eff swift::rewriting::RequirementMachine::computeCompletion(swift::rewriting::RewriteSystem::ValidityPolicy) + 223
8  swift-frontend           0x0000000106518d62 swift::rewriting::RequirementMachine::initWithGenericSignature(swift::CanGenericSignature) + 1106
9  swift-frontend           0x0000000106520854 swift::rewriting::RewriteContext::getRequirementMachine(swift::CanGenericSignature) + 308
10 swift-frontend           0x00000001064377e4 swift::GenericSignatureImpl::lookupNestedType(swift::Type, swift::Identifier) const + 612
11 swift-frontend           0x00000001060d1b1d (anonymous namespace)::TypeResolver::resolveIdentifierType(swift::IdentTypeRepr*, swift::TypeResolutionOptions) + 2205
12 swift-frontend           0x00000001060cd791 swift::ResolveTypeRequest::evaluate(swift::Evaluator&, swift::TypeResolution const*, swift::TypeRepr*, swift::GenericParamList*) const + 97
13 swift-frontend           0x00000001060deee9 llvm::Expected<swift::ResolveTypeRequest::OutputType> swift::Evaluator::getResultUncached<swift::ResolveTypeRequest>(swift::ResolveTypeRequest const&) + 505
14 swift-frontend           0x00000001060cd6b9 swift::TypeResolution::resolveType(swift::TypeRepr*, swift::GenericParamList*) const + 89
15 swift-frontend           0x000000010603f56f swift::RequirementRequest::evaluate(swift::Evaluator&, swift::WhereClauseOwner, unsigned int, swift::TypeResolutionStage) const + 607
16 swift-frontend           0x000000010655c489 llvm::Expected<swift::RequirementRequest::OutputType> swift::Evaluator::getResultUncached<swift::RequirementRequest>(swift::RequirementRequest const&) + 1225
17 swift-frontend           0x0000000106559d89 swift::WhereClauseOwner::visitRequirements(swift::TypeResolutionStage, llvm::function_ref<bool (swift::Requirement, swift::RequirementRepr*)>) const && + 1097
18 swift-frontend           0x000000010601cd1e checkGenericParams(swift::GenericContext*) + 318
19 swift-frontend           0x0000000106017dd8 swift::ASTVisitor<(anonymous namespace)::DeclChecker, void, void, void, void, void, void>::visit(swift::Decl*) + 19672
20 swift-frontend           0x000000010600fcc9 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 441
21 swift-frontend           0x000000010600fb01 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 193
22 swift-frontend           0x00000001060e06d7 swift::TypeCheckSourceFileRequest::evaluate(swift::Evaluator&, swift::SourceFile*) const + 567
23 swift-frontend           0x00000001060e3969 llvm::Expected<swift::TypeCheckSourceFileRequest::OutputType> swift::Evaluator::getResultUncached<swift::TypeCheckSourceFileRequest>(swift::TypeCheckSourceFileRequest const&) + 633
24 swift-frontend           0x00000001060e0452 swift::performTypeChecking(swift::SourceFile&) + 114
25 swift-frontend           0x00000001051a177d swift::CompilerInstance::performSema() + 285
26 swift-frontend           0x0000000104fffe7a swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 14234
27 swift-frontend           0x0000000104fbf5d4 swift::mainEntry(int, char const**) + 1108
28 dyld                     0x000000020ca9f4fe start + 462
29 dyld                     0x000000020ca9a000 start + 18446744073709530320
error: Abort trap: 6 (in target 'RealmSwift' from project 'Realm')
@nevil
Copy link
Author

nevil commented Mar 11, 2022

Related or duplicate?
https://bugs.swift.org/browse/SR-15792

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added type checker Area → compiler: Semantic analysis generics Feature: generic declarations and types compiler crash crash Bug: A crash, i.e., an abnormal termination of software duplicate Resolution: Duplicates another issue swift 5.6 labels Jan 16, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software duplicate Resolution: Duplicates another issue generics Feature: generic declarations and types swift 5.6 type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants