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-12146] Swiift 5.2 bad access _allocateUninitializedArray #54581

Closed
swift-ci opened this issue Feb 7, 2020 · 10 comments
Closed

[SR-12146] Swiift 5.2 bad access _allocateUninitializedArray #54581

swift-ci opened this issue Feb 7, 2020 · 10 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Feb 7, 2020

Previous ID SR-12146
Radar rdar://problem/59302419
Original Reporter benasher44 (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

macOS 10.15.2
Xcode 11.4b1
swift --version:

Apple Swift version 5.2 (swiftlang-1103.0.22 clang-1103.0.22)
Target: x86_64-apple-darwin19.2.0
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: a6aafd7c9efbacc8213569639a7793de

duplicates:

  • SR-12169 Using objc_runtime_name causes Swift 5.2 binary segmentation fault

Issue Description:

I have a crash with this trace when we launch our iOS app:

The crashing code looks something like this (runs in a non-main global GCD queue):

let dict: [TypeAFromObjCLib: TypeBFromObjcLib] = [
    .classVarA: TypeBFromObjcLib(),
    .classVarB: TypeBFromObjcLib(),
    .classVarC: TypeBFromObjcLib(),
]

It crashes creating the dictionary.

ObjCLib is a binary Obj-C framework.

I've been trying all day to come up with a small reproducer, but everything I've tried works fine (i.e. doesn't reproduce the crash) 🙁

@swift-ci
Copy link
Collaborator Author

swift-ci commented Feb 7, 2020

Comment by Ben A (JIRA)

This worked in Xcode 11.3. It crashes in Xcode 11.4b1

@beccadax
Copy link
Contributor

@swift-ci create

@beccadax
Copy link
Contributor

benasher44 (JIRA User) Thank you for reporting this. To help us figure out what’s going on, could you share either a copy of your project, or a crash report file from Console.app, with us? If you’re worried about posting this information in a public bug tracker, you can file it through Apple’s Feedback Assistant instead—information filed there is kept confidential.

@swift-ci
Copy link
Collaborator Author

Comment by Ben A (JIRA)

Filed with the binary (private to our app) framework and a repro script I used to run a small sample that links the binary framework at FB7572162

@swift-ci
Copy link
Collaborator Author

Comment by Ben A (JIRA)

confirmed this still happens in Xcode 11.4b2

@swift-ci
Copy link
Collaborator Author

swift-ci commented Mar 2, 2020

Comment by Ben A (JIRA)

brentdax (JIRA User) just wanted to check in. Is this still being looked at? Was the info provided in the feedback assistant enough to debug? Thanks

@swift-ci
Copy link
Collaborator Author

Comment by Ben A (JIRA)

Confirmed still crashing in Xcode 11.4b3

@swift-ci
Copy link
Collaborator Author

Comment by Ben A (JIRA)

brentdax (JIRA User) this still happens in Xcode 11.4 GM. Will there be a follow up release to fix this? Our app now crashes on launch.

@jckarter
Copy link
Member

This looks like SR-12169. As a workaround, could you avoid using `objc_runtime_name`?

@swift-ci
Copy link
Collaborator Author

Comment by Ben A (JIRA)

We're going to try

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

3 participants