Last active
March 30, 2020 09:57
-
-
Save gamako/e475f5bf7c30c80124356a8d2a69d748 to your computer and use it in GitHub Desktop.
Xcode11.4でビルドすると32bit iPhoneでクラッシュするサンプルコード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol P { | |
init() | |
} | |
struct AAA : P { | |
} | |
struct BBB<T: P> { | |
let a : Int = 0 | |
let b : Int = 0 | |
let c : Int = 0 | |
let d : Int = 0 | |
let e: T = T.init() | |
let f: Int = 0 | |
let g: Int = 0 | |
let h: Int = 0 | |
let i: Int = 0 | |
} | |
public func crash() { | |
let d : BBB<AAA> = BBB() | |
print("\(d)") | |
} | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
crash() | |
return true | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment