(Possible) crash/memory corruption in Swift runtime on iOS7

Originator:i.misuno
Number:rdar://24030433 Date Originated:01-Jan-2016
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification:Crash Reproducible:Always
 
I'm developing an app using Swift (XCode Version 7.2 / build 7C68) targeting iOS7.
The app crashes on iPhone4 running iOS7.1.2 in client code with what seems to be a memory corruption.
Please see attached crash logs:
(DuduKids  01-01-16 12-04.crash.txt) https://drive.google.com/open?id=0B7S7eiBvB1zXRXA4YlRNME1OYUE

The app runs fine on devices running iOS8 and 9, and on Simulator (32/64 bit).

I'm not able to debug the issue using LLDB, because at some point it stops showing correct output for memory contents. I'm also not able to run the app with Address Sanitizer, as it reports:
==2783==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.

Steps to Reproduce:
Compile attached project and run it on iPhone4 device running iOS7:
(SampleProject_no_objc.zip) https://drive.google.com/open?id=0B7S7eiBvB1zXLWdKZGd2REdZdnM

Expected Results:
(expected_result.png) https://drive.google.com/open?id=0B7S7eiBvB1zXTmdXNHZvWFFMQ00

Actual Results:
On devices running iOS8 and 9 (iPhone/iPad), and on simulator, the app works as expected.
On iPhone4/iOS7 the app crashes below Atomic.lock() function.

Version:
iOS7.1.2 (11D257)

Configuration:
iPhone4

Also filed as 
https://github.com/ReactiveCocoa/ReactiveCocoa/issues/2637

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!