-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Description
Previous ID | SR-11765 |
Radar | None |
Original Reporter | @beccadax |
Type | Improvement |
Status | Resolved |
Resolution | Done |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Improvement, DiagnosticsQoI, StarterBug |
Assignee | tt (JIRA) |
Priority | Medium |
md5: ed57d82d3d08bd1671263c3f7bd7e9c4
Issue Description:
The call to RunImmediately()
in processCommandLineAndRunImmediately()
in FrontendTool.cpp should be made in the scope of a PrettyStackTraceEntry
saying that the crash occurred while running user code. This would help convey to users and compiler contributors alike that the crash might be caused by a bug in the user's code, rather than a bug in Swift.
If you're new to the compiler: Instances of the PrettyStackTraceEntry
class are declared as local variables; if the Swift compiler crashes, it prints out all of their messages before printing the stack trace of the crash. They allow us to include additional contextual information in crash logs. You'll find examples of them being declared throughout the compiler—just search the source code for "PrettyStackTraceEntry".