Skip to content

[SR-9858] Swift 5.0 compiler crashes with error 'Bus error: 10' #52265

@swift-ci

Description

@swift-ci
Previous ID SR-9858
Radar rdar://problem/47787344
Original Reporter mosbah (JIRA User)
Type Bug
Status Closed
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 5.0Regression, CompilerCrash
Assignee @aschwaighofer
Priority Medium

md5: 088d915c2a9466a05b5a77f02f864d05

Issue Description:

Using

swift --version
Apple Swift version 5.0 (swiftlang-1001.0.45.7 clang-1001.0.37.7)
Target: x86_64-apple-darwin18.2.0
ABI version: 0.6

Compiler crashes when compiling the attached project with the following error: (only in release build), randomly it fails with a different error:

error: Illegal instruction: 4
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target: Cache-iOS)    cd /Users/Cache    export DEVELOPER_DIR=/Applications/Xcode-10.2.app/Contents/Developer    export SDKROOT=/Applications/Xcode-10.2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk    /Applications/Xcode-10.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name Cache -O -whole-module-optimization -enforce-exclusivity=checked -sdk /Applications/Xcode-10.2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk -target x86_64-apple-ios8.0-simulator -g -module-cache-path /Users/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -swift-version 5 -Xlinker -rpath -Xlinker /usr/lib/swift-0.6 -I /Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Products/Release-iphonesimulator -F /Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Products/Release-iphonesimulator -c -num-threads 4 /Users/Cache/Source/Shared/Storage/DiskStorage.swift /Users/Cache/Source/Shared/Library/ImageWrapper.swift /Users/Cache/Source/Shared/Storage/StorageObservationRegistry.swift /Users/Cache/Source/Shared/Library/Types.swift /Users/Cache/Source/Shared/Extensions/Date+Extensions.swift /Users/Cache/Source/Shared/Library/DataSerializer.swift /Users/Cache/Source/Shared/Storage/StorageAware.swift /Users/Cache/Source/Shared/Library/TypeWrapper.swift /Users/Cache/Source/Shared/Library/JSONDictionaryWrapper.swift /Users/Cache/Source/Shared/Library/MD5.swift /Users/Cache/Source/Shared/Storage/MemoryStorage.swift /Users/Cache/Source/Shared/Library/Optional+Extension.swift /Users/Cache/Source/Shared/Configuration/DiskConfig.swift /Users/Cache/Source/Shared/Library/Transformer.swift /Users/Cache/Source/Shared/Library/Result.swift /Users/Cache/Source/Shared/Library/TransformerFactory.swift /Users/Cache/Source/Shared/Library/JSONArrayWrapper.swift /Users/Cache/Source/Shared/Storage/SyncStorage.swift /Users/Cache/Source/Shared/Library/Expiry.swift /Users/Cache/Source/Shared/Storage/Storage+Transform.swift /Users/Cache/Source/Shared/Library/StorageError.swift /Users/Cache/Source/Shared/Library/ObservationToken.swift /Users/Cache/Source/iOS/UIImage+Extensions.swift /Users/Cache/Source/Shared/Storage/HybridStorage.swift /Users/Cache/Source/Shared/Storage/AsyncStorage.swift /Users/Cache/Source/Shared/Extensions/JSONDecoder+Extensions.swift /Users/Cache/Source/Shared/Storage/KeyObservationRegistry.swift /Users/Cache/Source/Shared/Storage/Storage.swift /Users/Cache/Source/Shared/Library/MemoryCapsule.swift /Users/Cache/Source/Shared/Configuration/MemoryConfig.swift /Users/Cache/Source/Shared/Library/ExpirationMode.swift /Users/Cache/Source/Shared/Library/Entry.swift -output-file-map /Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/Objects-normal/x86_64/Cache-iOS-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/Objects-normal/x86_64/Cache.swiftmodule -Xcc -I/Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/Cache-generated-files.hmap -Xcc -I/Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/Cache-own-target-headers.hmap -Xcc -I/Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/Cache-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/Cache-project-headers.hmap -Xcc -I/Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Products/Release-iphonesimulator/include -Xcc -I/Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/DerivedSources-normal/x86_64 -Xcc -I/Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/DerivedSources/x86_64 -Xcc -I/Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/DerivedSources -emit-objc-header -emit-objc-header-path /Users/Library/Developer/Xcode/DerivedData/Cache-cjqvxvklvcwjiyefzrbaoceyjnfv/Build/Intermediates.noindex/Cache.build/Release-iphonesimulator/Cache-iOS.build/Objects-normal/x86_64/Cache-Swift.h -working-directory /Users/Cache

<unknown>:0: error: unable to execute command: Bus error: 10

<unknown>:0: error: compile command failed due to signal 10 (use -v to see invocation)

Context: after updating Cache to Swift 5.0 with this PR

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareregressionswift 5.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions