We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
macOS Sierra 10.12.5 Xcode 9 beta 1 Swift 3.2/4
md5: 662f5f52aa64a4841c2845dda9fc7d09
Issue Description:
Consider the following code, which runs error-free in Swift 3.1, but results in a runtime crash in Swift 3.2 and Swift 4:
import Foundation struct S { var str = UUID().uuidString } func go() { var s = S() s = S() _ = DispatchQueue.global(qos: .default).async { print(s.str) } } go() sleep(1)
This crashes using swift that ships with Xcode 9 beta 1 by running it in the following ways: swift -swift-version 3 file.swift swift file.swift
swift -swift-version 3 file.swift
swift file.swift
Output from the program:
0CC3D5F2-3F86-4B6E-88B6-181891DEF66C 0 swift 0x00000001110823aa PrintStackTraceSignalHandler(void*) + 42 1 swift 0x00000001110817e6 SignalHandler(int) + 662 2 libsystem_platform.dylib 0x00007fffb6d64b3a _sigtramp + 26 3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1227470048 4 libsystem_platform.dylib 0x0000000113ad1744 _sigtramp + 1557580836 5 libswiftCore.dylib 0x00000001167a6770 _swift_release_dealloc + 16 6 libswiftCore.dylib 0x0000000113ad1894 _swift_release_dealloc + 4247957812 7 libsystem_blocks.dylib 0x00007fffb6b89952 _Block_release + 102 8 libdispatch.dylib 0x00007fffb6b1f8fc _dispatch_client_callout + 8 9 libdispatch.dylib 0x00007fffb6b2e196 _dispatch_queue_override_invoke + 743 10 libdispatch.dylib 0x00007fffb6b216b5 _dispatch_root_queue_drain + 476 11 libdispatch.dylib 0x00007fffb6b2148c _dispatch_worker_thread3 + 99 12 libsystem_pthread.dylib 0x00007fffb6d6e5a2 _pthread_wqthread + 1299 13 libsystem_pthread.dylib 0x00007fffb6d6e07d start_wqthread + 13 Killed: 9
In Instruments, you can see that the string held by s is released an extra time.
The text was updated successfully, but these errors were encountered:
Comment by Ben A (JIRA)
Ben-G (JIRA User) spoke with @jckarter about this one at the lab today.
Sorry, something went wrong.
@swift-ci create
Comment by Matt Rajca (JIRA)
Looks fixed in (swiftlang-900.0.58 clang-900.0.33).
Yep, this was master: apple/swift#10278 4.0: apple/swift#10283
No branches or pull requests
Environment
macOS Sierra 10.12.5
Xcode 9 beta 1
Swift 3.2/4
Additional Detail from JIRA
md5: 662f5f52aa64a4841c2845dda9fc7d09
Issue Description:
Consider the following code, which runs error-free in Swift 3.1, but results in a runtime crash in Swift 3.2 and Swift 4:
This crashes using swift that ships with Xcode 9 beta 1 by running it in the following ways:
swift -swift-version 3 file.swift
swift file.swift
Output from the program:
In Instruments, you can see that the string held by s is released an extra time.
The text was updated successfully, but these errors were encountered: