Skip to content

[SR-9771] Playgrounds not Trapping during Bad Access #62

Open
@swift-ci

Description

@swift-ci
Previous ID SR-9771
Radar rdar://33820622
Original Reporter SafelySwift (JIRA User)
Type Bug

Attachment: Download

Environment

![](https://raw.githubusercontent.com/SafelySwift/images/master/Screen%20Shot%202019-01-26%20at%204.31.20%20PM.png)

Additional Detail from JIRA
Votes 0
Component/s Xcode Playground Support
Labels Bug
Assignee None
Priority Medium

md5: 795ff7ff2b7dd30d73ddefbcd99f8fd5

Issue Description:

As per this Swift Forums topic, the following code should trap due to overlapping read/write access.

var stepSize = 1

func increment(_ number: inout Int) {
    number += stepSize
}

increment(&stepSize)

As specified on the docs,

> The read and write accesses refer to the same memory and they overlap, producing a conflict.

However, I put the code in a playground like such:

![](https://github.com/SafelySwift/images/blob/master/Screen%20Shot%202019-01-26%20at%204.30.06%20PM.png)

And nothing happens

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