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
swift-ci opened this issue
Nov 28, 2020
· 3 comments
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 softwareSILGenArea → compiler: The SIL generation stage
Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8) Target: x86_64-apple-darwin19.6.0
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug, CompilerCrash, SILGen
Assignee
None
Priority
Medium
md5: 0458a40d0d104b2bfb3556740322597b
Issue Description:
The attached code crashes during compilation, I tried to reduce it as much as possible.
The full stack trace is attached, but the summary reads
1. Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
2. While evaluating request SILGenSourceFileRequest(SIL Generation for file "crasher.swift")
3. While emitting SIL for 'f(_:_:)' (at crasher.swift:17:1)
4. While silgen emitFunction SIL function "@$s7crasher1fyyx_xtlF".
for 'f(_:_:)' (at crasher.swift:17:1)
5. While silgen closureexpr SIL function "@$s7crasher1fyyx_xtlFySRyXeGXEfU_".
for expression at [crasher.swift:19:46 - line:21:3] RangeText="{ buffer in
f(array, Array(UnsafeBufferPointer(buffer)))
"
There are two small changes I discovered which when applied don't lead to a crash:
Thank you for reporting this issue Janek. Luckily it looks like it's already fixed in the top-of-tree Swift compiler main branch. Can you verify what it has the behavior that you would expect? You can download a Trunk Development (main) snapshot from https://swift.org/download/#snapshots to git it a try.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareSILGenArea → compiler: The SIL generation stage
Attachment: Download
Environment
Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)
Target: x86_64-apple-darwin19.6.0
Additional Detail from JIRA
md5: 0458a40d0d104b2bfb3556740322597b
Issue Description:
The attached code crashes during compilation, I tried to reduce it as much as possible.
The full stack trace is attached, but the summary reads
There are two small changes I discovered which when applied don't lead to a crash:
The text was updated successfully, but these errors were encountered: