You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any initializer can be called recursively and the compiler will emit no warnings. The resulting code will crash at runtime with an non-descriptive error (Segmentation Fault). The Swift compiler should not allow initializers to call themselves recursively, unlike methods or functions there is no scenario where this will not crash.
Attachment: Download
Environment
Swift 4.1 development snapshot on Ubuntu 16.04
swift-4.1-DEVELOPMENT-SNAPSHOT-2017-11-20-a-ubuntu16.04.tar.gz
Also tried in Ubuntu 16.10
swift-4.1-DEVELOPMENT-SNAPSHOT-2017-11-20-a-ubuntu16.10.tar.gz
Additional Detail from JIRA
md5: af8609b588fceb597731dd9852454e34
duplicates:
Issue Description:
Any initializer can be called recursively and the compiler will emit no warnings. The resulting code will crash at runtime with an non-descriptive error (Segmentation Fault). The Swift compiler should not allow initializers to call themselves recursively, unlike methods or functions there is no scenario where this will not crash.
Here are other reproducible examples:
https://user-images.githubusercontent.com/2727770/164962448-399c6ca2-849e-45ac-a724-8be99343d0cc.gz
http://swift.sandbox.bluemix.net/#/repl/5a15f40343e1ee1b72bcd2f9
http://swift.sandbox.bluemix.net/#/repl/5a15f8d243e1ee1b72bcd2fb
The text was updated successfully, but these errors were encountered: