swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.61k stars 10.37k forks source link

[SR-6213] Segmentation fault when converting to Swift 4 from 3.2 #48765

Open swift-ci opened 7 years ago

swift-ci commented 7 years ago
Previous ID SR-6213
Radar None
Original Reporter rexmas (JIRA User)
Type Bug
Environment Xcode 9.0 Swift 3.2 to 4.0
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Source Tooling | |Labels | Bug, Migrator | |Assignee | None | |Priority | Medium | md5: 72ec4118d5cc8414f3ea0ad4203fc1db

Issue Description:

Attempted to use the Swift 4 migrator and received a Segmentation Fault

stack trace

0  swift                    0x000000010c0cedba PrintStackTraceSignalHandler(void*) + 42
1  swift                    0x000000010c0ce1f6 SignalHandler(int) + 662
2  libsystem_platform.dylib 0x00007fffb97bcb3a _sigtramp + 26
3  libsystem_platform.dylib 000000000000000000 _sigtramp + 1183069408
4  swift                    0x0000000109707ff0 swift::migrator::updateCodeAndEmitRemap(swift::CompilerInstance*, swift::CompilerInvocation const&) + 960
5  swift                    0x0000000108a3e775 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 1925
6  swift                    0x0000000108a3c784 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7716
7  swift                    0x00000001089f16a8 main + 12248
8  libdyld.dylib            0x00007fffb95ad235 start + 1
Stack dump:
0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/Rex/Documents/remind101/r101-ios-teacher/RemindLocalization/Localization.swift -target x86_64-apple-ios9.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk -I /Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Products/Developer-iphonesimulator -F /Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Products/Developer-iphonesimulator -enable-testing -g -import-underlying-module -module-cache-path /Users/Rex/Library/Developer/Xcode/DerivedData/ModuleCache -swift-version 3 -enforce-exclusivity=checked -serialize-debugging-options -Xcc -I/Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/RemindLocalization-generated-files.hmap -Xcc -I/Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/RemindLocalization-own-target-headers.hmap -Xcc -I/Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/RemindLocalization-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/RemindLocalization-project-headers.hmap -Xcc -I/Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Products/Developer-iphonesimulator/include -Xcc -I/Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/DerivedSources/x86_64 -Xcc -I/Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/DerivedSources -Xcc -DRD_CONSOLE_LOGGING=1 -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -DRD_DOMAIN=@"remind.com" -Xcc -DRD_API_URL=@"https://api.remind.com" -Xcc -DRD_CRITTERCISM_APP_ID=@"" -Xcc -DRD_GOOGLE_AUTH_ID=@"648260376696-nvr19uo7ojgfjhqtb5a2vrmk8o0cfq4k.apps.googleusercontent.com" -Xcc -DRD_DEBUG=1 -Xcc -DRD_UI_TEST=0 -Xcc -DRD_CRASHLYTICS_KEY=b206608de2f05a0ace055c0c3aa0ae30c8b56a97 -Xcc -DRD_DEFAULT_SETTINGS=@"staging_settings" -Xcc -DRD_APP_SCHEME=@"chr" -Xcc -DRD_APP_GROUP_CONTAINER=@"group.com.remind.dev.Remind101" -Xcc -DRD_DATA_MODEL=@"RDDataModel" -Xcc -DRD_SQL_STORE=@"RDDataModel.sqlite" -Xcc -DSTAGING_API_URL=@"https://api.classchirp.com" -Xcc -DPRODUCTION_API_URL=@"https://api.remind.com" -Xcc -DRD_APNS_ENV=@"sandbox" -Xcc -DRD_APNS_APP=@"latest" -Xcc -DRD_APPS_FLYER_ID=@"522826277" -Xcc -DRD_APPS_FLYER_KEY=@"jqWtFbWoVKQk68aTUMCTL" -Xcc -DRD_APPBOY_KEY=@"5bcc0e5f-08c2-45ce-838c-20284a10b934" -Xcc -DRD_RC=0 -Xcc -ivfsoverlay -Xcc /Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/Rex/Documents/remind101/r101-ios-teacher -emit-module-doc-path /Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/Objects-normal/x86_64/RemindLocalization.swiftdoc -serialize-diagnostics-path RemindLocalization.dia -Onone -parse-as-library -module-name RemindLocalization -emit-module-path /Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/Objects-normal/x86_64/RemindLocalization.swiftmodule -emit-objc-header-path /Users/Rex/Library/Developer/Xcode/DerivedData/Remind101-arttxvzhkjgautfkzrpwpefgoydr/Build/Intermediates.noindex/SwiftMigration/Developer/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/RemindLocalization.build/Objects-normal/x86_64/RemindLocalization-Swift.h -emit-dependencies-path RemindLocalization.d -emit-remap-file-path RemindLocalization.remap -o RemindLocalization.o
belkadan commented 7 years ago

@akyrtzi, @nkcsgexi, anything useful here without the project? (Alternately, Rex, if you're willing to share the project with Apple folks you could attach it at https://bugreport.apple.com.)

swift-ci commented 7 years ago

Comment by Rex Fenley (JIRA)

Huge proprietary project. When I find some time I'll see if I can make a small test project.