Files
swift-mirror/test/Runtime/crash_without_backtrace.swift
Michael Gottesman 6bc28ff1c9 [strip -ST] Disable runtime stack trace dumping on Darwin when asserts are disabled.
This commit disables runtime stack trace dumping via dladdr on Darwin when
asserts are disabled.

This stack trace dumping was added as a way to improve the ability to debug the
compiler for compiler developers. This is all well and good but having such a
feature always enabled prevents us from reducing the size of the swift standard
library by eliminating the swift nlist.

rdar://31372220
2017-05-04 16:46:26 -06:00

23 lines
493 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
// UNSUPPORTED: runtime-dladdr-backtraces
// 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()