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-15983] Xcode 13.3 (Swift 5.6) causes error: Segmentation fault: 11
build error
#58244
Comments
Comment by Yasuhiro Inami (JIRA) As mentioned in Actomaton/Actomaton-Gallery#33 , While this workaround can cope the compiler bug from developer-side, the code will now become ugly (which I don't want to merge this PR), so I believe this bug needs to be fixed by Swift compiler team. |
@swift-ci create |
Comment by Yasuhiro Inami (JIRA) Steps:
Segfault log: 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.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Constants.swift -primary-file /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Example.swift -primary-file /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/ExampleList.swift -primary-file /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Examples/CollisionExample.swift -primary-file /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Examples/DoublePendulumExample.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Examples/GaltonBoardExample.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Examples/GravitySurfaceExample.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Examples/GravityUniverseExample.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Examples/LineCollisionExample.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Examples/PendulumExample.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Examples/SpringExample.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Examples/SpringPendulumExample.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Helpers/Collision.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Helpers/Path+Arrow.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Helpers/RungeKutta.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Helpers/VectorMath+Extensions.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Models/Bob/Bob.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Models/Bob/World+Bob.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Models/Object/CircleObject.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Models/Object/LineObject.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Models/Object/Object+Presets.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Models/Object/Object.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/Models/Object/World+Object.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/PhysicsRoot/PhysicsRoot.State+Presets.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/PhysicsRoot/PhysicsRoot.State.Current.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/PhysicsRoot/PhysicsRoot.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/PhysicsRoot/PhysicsRootView.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/World/ArrowScale.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/World/ObjectLike.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/World/World.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/World/WorldConfiguration.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/World/WorldView+Content.swift /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/World/WorldView.swift -supplementary-output-file-map /var/folders/wd/zwsykdvs28x0mp2l6kcvc7hr0000gp/T/TemporaryDirectory.kBrdQm/supplementaryOutputs-1 -target arm64-apple-ios14.0-simulator -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk -I /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator -I /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/lib -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/PackageFrameworks -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/PackageFrameworks -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/PackageFrameworks -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/PackageFrameworks -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/PackageFrameworks -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/PackageFrameworks -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/PackageFrameworks -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/PackageFrameworks -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/PackageFrameworks -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/PackageFrameworks -F /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.4.sdk/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/inamiyasuhiro/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.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-driver -serialize-debugging-options -Xcc -working-directory -Xcc /Users/inamiyasuhiro/github/Actomaton-Gallery -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -I/Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Intermediates.noindex/Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/swift-overrides.hmap -Xcc -I/Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Intermediates.noindex/Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/DerivedSources-normal/arm64 -Xcc -I/Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Intermediates.noindex/Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/DerivedSources/arm64 -Xcc -I/Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Intermediates.noindex/Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG=1 -module-name Physics -target-sdk-version 15.4 -o /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Intermediates.noindex/Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/Objects-normal/arm64/Constants.o -o /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Intermediates.noindex/Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/Objects-normal/arm64/Example.o -o /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Intermediates.noindex/Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/Objects-normal/arm64/ExampleList.o -o /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Intermediates.noindex/Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/Objects-normal/arm64/CollisionExample.o -o /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Build/Intermediates.noindex/Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/Objects-normal/arm64/DoublePendulumExample.o -index-unit-output-path /Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/Objects-normal/arm64/Constants.o -index-unit-output-path /Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/Objects-normal/arm64/Example.o -index-unit-output-path /Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/Objects-normal/arm64/ExampleList.o -index-unit-output-path /Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/Objects-normal/arm64/CollisionExample.o -index-unit-output-path /Actomaton-Gallery.build/Debug-iphonesimulator/Physics.build/Objects-normal/arm64/DoublePendulumExample.o -index-store-path /Users/inamiyasuhiro/Library/Developer/Xcode/DerivedData/Actomaton-Gallery-clipafmrwkfubzezuqwgjpnufoek/Index/DataStore -index-system-modules
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/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Example.swift")
4. While type-checking extension of ObjectWorldExample (at /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Example.swift:93:1)
5. While type-checking 'draggingEmptyArea(_:point:)' (at /Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Example.swift:96:5)
6. While evaluating request CheckRedeclarationRequest(Physics.(file).ObjectWorldExample extension.draggingEmptyArea(_:point:)@/Users/inamiyasuhiro/github/Actomaton-Gallery/Sources/Physics/ExampleList/Example.swift:96:10)
7. While building rewrite system for generic signature <τ_0_0 where τ_0_0 : ObjectWorldExample, τ_0_0.Obj == CircleObject>
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 0x0000000104ec6f88 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 swift-frontend 0x0000000104ec5f9c llvm::sys::RunSignalHandlers() + 112
2 swift-frontend 0x0000000104ec7618 SignalHandler(int) + 344
3 libsystem_platform.dylib 0x000000019ffc04e4 _sigtramp + 56
4 swift-frontend 0x00000001019c66c0 swift::ProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::SubstOptions) const + 380
5 swift-frontend 0x00000001019c66c0 swift::ProtocolConformance::getTypeWitnessAndDecl(swift::AssociatedTypeDecl*, swift::SubstOptions) const + 380
6 swift-frontend 0x00000001019e8dfc swift::rewriting::PropertyMap::concretizeNestedTypesFromConcreteParent(swift::rewriting::Term, swift::RequirementKind, swift::CanType, llvm::ArrayRef<swift::rewriting::Term>, llvm::ArrayRef<swift::ProtocolDecl const*>, llvm::TinyPtrVector<swift::ProtocolConformance*>&, llvm::SmallVectorImpl<std::__1::pair<swift::rewriting::MutableTerm, swift::rewriting::MutableTerm> >&) const + 1472
7 swift-frontend 0x00000001019e8788 swift::rewriting::PropertyMap::concretizeNestedTypesFromConcreteParents(llvm::SmallVectorImpl<std::__1::pair<swift::rewriting::MutableTerm, swift::rewriting::MutableTerm> >&) const + 532
8 swift-frontend 0x00000001019e710c swift::rewriting::PropertyMap::buildPropertyMap(unsigned int, unsigned int) + 2652
9 swift-frontend 0x00000001019f55e0 swift::rewriting::RequirementMachine::computeCompletion(swift::rewriting::RewriteSystem::ValidityPolicy) + 192
10 swift-frontend 0x00000001019f5448 swift::rewriting::RequirementMachine::initWithGenericSignature(swift::CanGenericSignature) + 892
11 swift-frontend 0x00000001019fc49c swift::rewriting::RewriteContext::getRequirementMachine(swift::CanGenericSignature) + 240
12 swift-frontend 0x000000010192267c swift::GenericSignatureImpl::getCanonicalTypeInContext(swift::Type) const::$_30::operator()() const + 164
13 swift-frontend 0x00000001019225b8 swift::GenericSignatureImpl::getCanonicalTypeInContext(swift::Type) const + 688
14 swift-frontend 0x0000000101a16120 swift::TypeBase::computeCanonicalType() + 2556
15 swift-frontend 0x000000010184b3d4 swift::ValueDecl::getOverloadSignatureType() const + 1188
16 swift-frontend 0x0000000101546100 swift::CheckRedeclarationRequest::evaluate(swift::Evaluator&, swift::ValueDecl*) const + 924
17 swift-frontend 0x000000010154ad5c (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 1136
18 swift-frontend 0x0000000101551380 swift::ASTVisitor<(anonymous namespace)::DeclChecker, void, void, void, void, void, void>::visit(swift::Decl*) + 15144
19 swift-frontend 0x000000010154aa7c (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 400
20 swift-frontend 0x000000010154a8e0 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 204
21 swift-frontend 0x000000010160683c swift::TypeCheckSourceFileRequest::evaluate(swift::Evaluator&, swift::SourceFile*) const + 540
22 swift-frontend 0x00000001016095e0 llvm::Expected<swift::TypeCheckSourceFileRequest::OutputType> swift::Evaluator::getResultUncached<swift::TypeCheckSourceFileRequest>(swift::TypeCheckSourceFileRequest const&) + 564
23 swift-frontend 0x00000001016065cc swift::performTypeChecking(swift::SourceFile&) + 120
24 swift-frontend 0x00000001008db5d0 swift::CompilerInstance::performSema() + 256
25 swift-frontend 0x0000000100768348 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 4072
26 swift-frontend 0x0000000100730130 swift::mainEntry(int, char const**) + 808
27 dyld 0x00000001077210f4 start + 520
error: Segmentation fault: 11 (in target 'Physics' from project 'Actomaton-Gallery' at path '/Users/inamiyasuhiro/github/Actomaton-Gallery/Package.swift') |
@swift-ci create |
Environment
Xcode 13.3 (Swift 5.6)
Additional Detail from JIRA
md5: 7ca47e40fc4ff1cff78043cb94a7300e
Issue Description:
See Actomaton/Actomaton-Gallery#33 for same description.
New Xcode 13.3 (Swift 5.6) causes `error: Segmentation fault: 11` error when building `SwiftUI-Gallery` iOS app project.
As of 22fb93f, there was no such build error in Xcode 13.2 (Swift 5.5), but started to occur from Xcode 13.3.
Bug-reproducing branch: https://github.com/inamiy/Actomaton-Gallery/tree/bug/Xcode13.3-segfault
1. 22fb93f Segfault when building Xcode 13.3 (no error in Xcode 13.2)
2. 8145848 Commented-out `Physics` module, and Xcode 13.3 build succeeds
3. 8924c6f Re-enable part of `Physics` module, and Xcode 13.3 build succeeds
4. 6231b40 Re-enable more part of `Physics` module, and Xcode 13.3 build fails due to segfault
So the problematic code seems to live in 6231b40 but no other clues so far.
(One possible issue might be protocol extension with associated type constraint i.e. `where Obj == CircleObject` ?)
The text was updated successfully, but these errors were encountered: