Files
swift-mirror/test/Runtime/crash_without_backtrace.swift
Kuba (Brecka) Mracek fc7dbefcf8 Revert backtrace ban and start printing backtraces from the runtime again (#9528)
* Revert "[strip -ST] Disable runtime stack trace dumping on Darwin when asserts are disabled."
This reverts commit 6bc28ff1c9.
* Bring back important fixes from the revert of 6bc28ff1c9.
* Change swift::swift_reportError to only print the backtrace in assert builds (swift::warning prints backtrace always).
2017-05-12 15:46:35 -07:00

24 lines
517 B
Swift

// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: %target-build-swift %s -o %t/out
// RUN: not --crash %t/out 2>&1 | %FileCheck %s
// UNSUPPORTED: OS=watchos
// UNSUPPORTED: OS=ios
// UNSUPPORTED: OS=tvos
// REQUIRES: swift_stdlib_no_asserts
// REQUIRES: executable_test
// This file just causes a crash in the runtime to check whether or not a stack
// trace is produced from the runtime.
// CHECK-NOT: Current stack trace:
import Swift
func foo() -> Int {
return UnsafePointer<Int>(bitPattern: 0)!.pointee
}
foo()