Xcode 8 beta 6: Crash in playground with code that runs fine separately

Originator:ole.begemann
Number:rdar://27885726 Date Originated:17-Aug-2016 04:09 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 8b6 (8S201h)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
I can reproduce an EXC_BAD_ACCESS crash in the compiler/SourceKit/playground execution context with code that (seemingly) works fine when run in a normal command-line project.

Steps to Reproduce:
1. Open the attached playground in Xcode 8 beta 6.

Expected Results:
The playground executes without errors and shows the result of `list` in line 38.

Actual Results:
The playground crashes with "EXC_BAD_ACCESS (code-2, address=0x7fff5e2c1ff8)" in line 38.

Regression:
n/a

Notes:
Paste the same code into main.swift in a blank macOS command line project and run it. It runs fine without crashing.

The problem is somehow related to the List.makeIterator() method in combination with List.description. Running the same code as in List.description outside of List.description works just fine, so together with the fact that it only crashes in a playground I guess it has something to do with the things the playground does to display results in the sidebar?

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!