Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-11765] Wrap RunInmediately() in a pretty stack trace indicating we are running user code #54172

Closed
beccadax opened this issue Nov 11, 2019 · 2 comments
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers improvement

Comments

@beccadax
Copy link
Contributor

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".

@beccadax
Copy link
Contributor Author

#28284

@swift-ci
Copy link
Collaborator

Comment by Tapan Thaker (JIRA)

Reopening this issue because we had to revert the commit earlier

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers improvement
Projects
None yet
Development

No branches or pull requests

2 participants