Skip to content

[SR-10772] Crash when mutating array of reference-type in struct on UIView prior to adding that view as a UIViewController's subview #3411

Open
@swift-ci

Description

@swift-ci
Previous ID SR-10772
Radar rdar://problem/51181968
Original Reporter JUSTINMKAUFMAN (JIRA User)
Type Bug

Attachment: Download

Environment

Xcode 10.2.1

macOS 10.14.4

iOS 12.2 (Simulator and Real Device)

Additional Detail from JIRA
Votes 1
Component/s Compiler, Foundation
Labels Bug
Assignee None
Priority Medium

md5: aa7c36adb376caae7c60f0e368297049

Issue Description:

This code in the linked gist consistently crashes when built with the following Xcode 10.2.1 build settings:

Swift Version = 5
Enable Testability = NO
Optimization Level = -Owholemodule

Crash occurs both on Simulator and real device.

Gist:
https://gist.github.com/JUSTINMKAUFMAN/51a40d6e2771d9229dcc629512200202

Full Xcode project zip is attached.

!CrashViewController.png|width=291,height=187,thumbnail!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions