[SR-11765] Wrap RunInmediately() in a pretty stack trace indicating we are running user code #54172
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
good first issue
Good for newcomers
improvement
Additional Detail from JIRA
md5: ed57d82d3d08bd1671263c3f7bd7e9c4
Issue Description:
The call to
RunImmediately()
inprocessCommandLineAndRunImmediately()
in FrontendTool.cpp should be made in the scope of aPrettyStackTraceEntry
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".The text was updated successfully, but these errors were encountered: