mirror of
https://github.com/apple/swift.git
synced 2026-02-27 18:26:24 +01:00
53 lines
2.3 KiB
Plaintext
53 lines
2.3 KiB
Plaintext
// RUN: %empty-directory(%t)
|
||
// RUN: %target-build-swift %S/Inputs/Crash.swift -parse-as-library -Onone -o %t/CrashNoDebug.exe
|
||
// RUN: %target-build-swift %S/Inputs/Crash.swift -parse-as-library -O -o %t/CrashOptNoDebug.exe
|
||
// RUN: %target-codesign %t/CrashNoDebug.exe
|
||
// RUN: %target-codesign %t/CrashOptNoDebug.exe
|
||
|
||
// RUN: env SWIFT_BACKTRACE=enable=yes,cache=no %target-run %t/CrashNoDebug.exe > %t/NoDebug.out 2>&1 || true
|
||
// RUN: %FileCheck %s --ignore-case --check-prefix NODEBUG < %t/NoDebug.out
|
||
|
||
// RUN: env SWIFT_BACKTRACE=enable=yes,cache=no %target-run %t/CrashOptNoDebug.exe > %t/OptNoDebug.out 2>&1 || true
|
||
// RUN: %FileCheck %s --ignore-case --check-prefix OPTNODEBUG < %t/OptNoDebug.out
|
||
|
||
// UNSUPPORTED: use_os_stdlib
|
||
// UNSUPPORTED: back_deployment_runtime
|
||
// UNSUPPORTED: asan
|
||
// REQUIRES: executable_test
|
||
// REQUIRES: backtracing
|
||
// REQUIRES: OS=macosx || OS=linux-gnu
|
||
|
||
|
||
// NODEBUG: *** Program crashed: {{(Bad pointer dereference|Access violation)}} at 0x{{0*}}4 ***
|
||
|
||
// NODEBUG: Thread 0 {{(".*" )?}}crashed:
|
||
|
||
// NODEBUG: 0 0x{{[0-9a-f]+}} level5() + {{[0-9]+}} in CrashNoDebug.exe
|
||
// NODEBUG: 1 [ra] 0x{{[0-9a-f]+}} level4() + {{[0-9]+}} in CrashNoDebug.exe
|
||
// NODEBUG: 2 [ra] 0x{{[0-9a-f]+}} level3() + {{[0-9]+}} in CrashNoDebug.exe
|
||
// NODEBUG: 3 [ra] 0x{{[0-9a-f]+}} level2() + {{[0-9]+}} in CrashNoDebug.exe
|
||
// NODEBUG: 4 [ra] 0x{{[0-9a-f]+}} level1() + {{[0-9]+}} in CrashNoDebug.exe
|
||
// NODEBUG: 5 [ra] 0x{{[0-9a-f]+}} static Crash.main() + {{[0-9]+}} in CrashNoDebug.exe
|
||
// NODEBUG: 6 [ra] [system] 0x{{[0-9a-f]+}} static Crash.$main() + {{[0-9]+}} in CrashNoDebug.exe
|
||
// NODEBUG: 7 [ra] 0x{{[0-9a-f]+}} main + {{[0-9]+}} in CrashNoDebug.exe
|
||
|
||
// NODEBUG: Registers:
|
||
|
||
// NODEBUG: Images ({{[0-9]+}} omitted):
|
||
|
||
// NODEBUG: {{0x[0-9a-f]+}}–{{0x[0-9a-f]+}}{{ +}}{{([0-9a-f]+|<no build ID>)}}{{ +}}CrashNoDebug.exe{{ +}}{{.*[\\/]}}CrashNoDebug.exe
|
||
|
||
|
||
// OPTNODEBUG: *** Program crashed: {{(Bad pointer dereference|Access violation)}} at 0x{{0*}}4 ***
|
||
|
||
// OPTNODEBUG: Thread 0 {{(".*" )?}}crashed:
|
||
|
||
// OPTNODEBUG: 0 0x{{[0-9a-f]+}} main + {{[0-9]+}} in CrashOptNoDebug.exe
|
||
|
||
// OPTNODEBUG: Registers:
|
||
|
||
// OPTNODEBUG: Images ({{[0-9]+}} omitted):
|
||
|
||
// OPTNODEBUG: {{0x[0-9a-f]+}}–{{0x[0-9a-f]+}}{{ +}}{{([0-9a-f]+|<no build ID>)}}{{ +}}CrashOptNoDebug.exe{{ +}}{{.*[\\/]}}CrashOptNoDebug.exe
|
||
|