forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[driver] Added support for detecting and reporting crashed subprocesses.
Added a TaskSignalledCallback to TaskQueue, which will be called instead of TaskFinishedCallback if the task exited abnormally. In Unix/TaskQueue.inc, check WIFSIGNALED if the task did not pass WIFEXITED, and call the TaskSignalledCallback if necessary. In Default/TaskQueue.inc, check for a return code of -2; if present, call the TaskSignalledCallback instead of the TaskFinishedCallback. Updated Compilation to pass a TaskSignalledCallback. Added diagnostics to indicate when a command signalled as well as when a command failed with either poor diagnostics or a non-1 exit code. (These match Clang’s diagnostics.) Added tests to ensure these diagnostics are emitted when the frontend crashes or fails an assertion (if assertions are available). This fixes <rdar://problem/16012199>. Swift SVN r13654
- Loading branch information
Showing
9 changed files
with
132 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// RUN: not %swift_driver -emit-executable -o %t.exe %s -Xfrontend -debug-assert-immediately 2>&1 | FileCheck %s | ||
// RUN: not %swift_driver -emit-executable -o %t.exe %s -Xfrontend -debug-assert-after-parse 2>&1 | FileCheck %s | ||
|
||
// REQUIRES: asserts | ||
|
||
// CHECK: error: swift frontend command failed due to signal | ||
|
||
println("Hello, World") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// RUN: not %swift_driver -emit-executable -o %t.exe %s -Xfrontend -debug-crash-immediately 2>&1 | FileCheck %s | ||
|
||
// RUN: not %swift_driver -emit-executable -o %t.exe %s -Xfrontend -debug-crash-after-parse 2>&1 | FileCheck %s | ||
|
||
// CHECK: error: swift frontend command failed due to signal | ||
|
||
println("Hello, World") |