Files
swift-mirror/test/Backtracing/Inputs/CrashWithThunk.swift
Alastair Houghton 6d930d39ec [Backtracing] Make tests work, plus various fixes.
Made the tests run, then fixed various issues with them.

rdar://101623384
2026-02-03 18:23:29 +00:00

19 lines
268 B
Swift

struct Foo<T> {
var value: T
}
func crash() {
print("I'm going to crash here")
let ptr = UnsafeMutablePointer<Int>(bitPattern: 4)!
ptr.pointee = 42
}
@main
struct CrashWithThunk {
static func main() {
let foo = Foo(value: crash)
foo.value()
}
}