5 ms·
Just installed, compiling a fairly large project gives me "Command failed due to signal: Illegal instruction: 4" without any further information. Smooth...
by misterdata 10y ago
Just installed, compiling a fairly large project gives me "Command failed due to signal: Illegal instruction: 4" without any further information. Smooth...
- okket 10y agoCongratulations, you managed to crash the compiler. Can you please file a bug? https://swift.org/contributing/#reporting-bugs https://swift.org/contributing/#reporting-bugs
- misterdata 10y agoOf course, just did. Very surprised that this happens for a 'source compatible' point release of Swift. Especially as this can be triggered with only five fairly simple lines of code. Not good.
- okket 10y agoThank you!
- numerlo 10y agoWell they are called bugs and they exist in every software. It's not like they did it on purpose.
- devsquid 10y agoYea, but the Swift compiler is extremely buggy. Plus its gotten buggier with each release.
- flipgimble 10y agoThat sounds like you are making engineering decisions by superstition. Unless you have some source of data to back it up, please don't spread your subjective misinformation.
- markcerqueira 10y agoI'm curious! Mind sharing your five lines of code if they are simple and don't contain anything special?
- misterdata 10y agohttps://gist.github.com/pixelspark/f4f34a257d84611e7204b646dfb4b3c2 https://gist.github.com/pixelspark/f4f34a257d84611e7204b646d... Real-world use: https://github.com/pixelspark/warp/blob/dcf57462bd400df6d067e582351f2b05e262b2fd/WarpCore/Sources/Concurrency.swift#L135 https://github.com/pixelspark/warp/blob/dcf57462bd400df6d067... (the typealias thing is a bit weird here, I agree - it also doesn't crash without it. Nevertheless this compiled fine on 3.0 and should show a nice error, not require me to leave out every other file from the build to find out where it goes wrong, then bisect that file to find out which line causes it)
- slavapestov 10y agoYour snippet works in the latest master development snapshot too it seems.
- bsaul 10y agoImho, Swift Compiler crashes are the single most worrying things for the swift language future, because it casts shadows over the unit tests, and thus make people doubt the reliability of the whole project.
- slavapestov 10y agoUnit testing a compiler for a language like Swift is hard because there are so many features that interact in complex ways. There are unit tests but it's easy to miss things that look "obvious" in hindsight. Until recently the focus was on finishing the design of the language itself and not fixing bugs or improving compile time. Now that the language is source stable the focus is shifting to the latter two tasks. Also source stability means we can build up a larger body of code for testing (imagine having to constantly migrate unit tests that exercise corner cases and quirks... not fun).
- bsaul 10y agoI understand. I guess the problem comes from the fact that the language is still extremely young and moving fast, and yet advertized by Apple itself as something that should be used right now to develop apps for the billion dollars iOS market.