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-12555] Xcode 11.4 / Swift 5.2 makes app crash during launch on 32-bit devices #54999

Open
swift-ci opened this issue Apr 9, 2020 · 5 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Apr 9, 2020

Previous ID SR-12555
Radar rdar://problem/62202459
Original Reporter tomkraina (JIRA User)
Type Bug
Environment

Xcode 11.4, Swift 5.2, iOS 10.3.4 running on iPhone 5 devices

Additional Detail from JIRA
Votes 5
Component/s Source Tooling
Labels Bug
Assignee None
Priority Medium

md5: 723eb85759e35b05c471d88725e870cd

Issue Description:

After releasing a new version of app built using Xcode 11.4 to the AppStore, I started receiving crash reports from devices running iOS 10.3. All of the devices are iPhone 5, there goes my suspicion that only 32-bit devices are affected.

The crash reports in Fabric/Crashlytics looks like this:

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000

Crashed: com.apple.main-thread
0 GoOut 0x634218 _dyld_register_func_for_add_image$shim
1 (Missing) 0x2800 (Missing)
2 (Missing) 0x9808c0 (Missing)
3 (Missing) 0x6e676953 (Missing)
4 (Missing) 0x7e100000 (Missing)
5 (Missing) 0x4658e0a6 (Missing)
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000

Crashed: com.apple.main-thread
0 GoOut 0x66c218 _dyld_register_func_for_add_image$shim + 2261323
1 (Missing) 0x2800 (Missing)
2 GTMSessionFetcher 0x9808c0 -[GTMSessionFetcher nextRetryInterval] + 3218 (GTMSessionFetcher.m:3218)
3 (Missing) 0x6e676953 (Missing)
4 (Missing) 0x33290000 (Missing)
5 (Missing) 0x46086142 (Missing)
@swift-ci
Copy link
Collaborator Author

swift-ci commented Apr 9, 2020

Comment by Tom Kraina (JIRA)

Related issue: https://bugs.swift.org/browse/SR-12511

@swift-ci
Copy link
Collaborator Author

Comment by victor (JIRA)

I figure out the real reason.
After lots of work such as log and instruction debugging, I am surely it's a bug xcode 11.4 swift compiler optimization. Detailly, the optimization cause a stack pointer (fp) at the point opening a new function stack frame. I show it in the following.
Refer to this
https://stackoverflow.com/questions/61074507/app-crash-xcode11-4-ios-10-3-3-10-3-4-iphone-5c-5-ipad4-armv7s/61223586#61223586

@swift-ci
Copy link
Collaborator Author

Comment by Tom Kraina (JIRA)

Filled a Feedback: FB7657583

@beccadax
Copy link
Contributor

@swift-ci create

@mikeash
Copy link
Contributor

mikeash commented Apr 23, 2020

This looks like an LLVM bug that's since been fixed. I believe Xcode 11.4.1 should have the fix. Please rebuild with that version and let us know if it still happens for you.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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