Skip to content

Instantly share code, notes, and snippets.

@gamako
Last active March 30, 2020 09:57
Show Gist options
  • Save gamako/e475f5bf7c30c80124356a8d2a69d748 to your computer and use it in GitHub Desktop.
Save gamako/e475f5bf7c30c80124356a8d2a69d748 to your computer and use it in GitHub Desktop.
Xcode11.4でビルドすると32bit iPhoneでクラッシュするサンプルコード
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