Skip to content

[SR-7013] Bad Access when obj is actually populated - Just after initialization #49561

Open
@swift-ci

Description

@swift-ci
Previous ID SR-7013
Radar rdar://problem/37606836
Original Reporter [email protected] (JIRA User)
Type Bug

Attachment: Download

Environment

Xcode 9 / Swift 4 / High Sierra

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 4.0Regression, RunTimeCrash
Assignee None
Priority Medium

md5: ac8553b6bc57084b892fa2c01927a11c

Issue Description:

Xcode 9 / Swift 4 / High Sierra

Note: this code worked fine in swift 3 and no code changes were made - updated to High Sierra / Xcode 9 and Swift 4

Ran the code and it started breaking all over the place with Bad Access

I ran with Zombies enabled but didn't get any

Only fix is intermittently working -> change the optimization to -02 Release builds do not work / fastest...

One example is attached. I initialize a variable with some values. In the next line I try to access the values. Object deinit is never called. Yet I get bad access.

This code is after some complex code that runs fine. Not sure if that's the problem??

Seems there are others having this issue. Check out the linked SO posts from my SO Post:

https://stackoverflow.com/questions/48795609/i-am-getting-exc-bad-access-code-1-address-0x30-bad-access-even-when-object-e

Unsure how to move forward with my project. I may have to find a different Mac and download the Swift 3.2 code and go back down in OS / Xcode / and Swift

Metadata

Metadata

Assignees

No one assigned

    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 softwareregressionrun-time crashBug → crash: Swift code crashed during executionswift 4.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions