Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
swift-ci opened this issue Jan 26, 2019 · 2 comments
Open

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

swift-ci opened this issue Jan 26, 2019 · 2 comments

Comments

@swift-ci
Copy link

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

@belkadan
Copy link

cc cwakamo (JIRA User), @atrick

@atrick
Copy link
Member

atrick commented Jan 29, 2019

This is indeed a known bug in Xcode playgrounds.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants