Skip to content

[SourceKit] Enable PrettyStackTrace printing #17205

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

Merged
merged 1 commit into from
Jun 14, 2018

Conversation

jrose-apple
Copy link
Contributor

In particular, this will result in PrettyStackTrace messages being included in crash logs when SourceKit crashes on Apple platforms.

In particular, this will result in PrettyStackTrace messages being
included in crash logs when SourceKit crashes on Apple platforms.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@benlangmuir
Copy link
Contributor

This should go in the call_once block inside sourcekitd_initialize in sourcekitdAPI-Common.cpp since it's per-process not per initialization.

@jrose-apple
Copy link
Contributor Author

I tried that and it didn't work. Are signal-handlers per-thread?

@jrose-apple
Copy link
Contributor Author

…no. But maybe it needs to get run after dispatch_initialize or whatever. …I'm really not sure why it makes a difference, but it does seem to.

@benlangmuir
Copy link
Contributor

Argh, of course. sourcekitd_initialize is running in the client, not the service. Don't mind me. Where you have it seems fine.

@jrose-apple
Copy link
Contributor Author

Any concerns about cherry-picking this to the 4.2 branch? It should only have an effect when the process was going to crash anyway.

Copy link
Contributor

@benlangmuir benlangmuir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No concerns; seems like a safe change for 4.2 to me.

@jrose-apple jrose-apple merged commit fb8c815 into swiftlang:master Jun 14, 2018
@jrose-apple jrose-apple deleted the jenga branch June 14, 2018 20:55
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Jun 14, 2018
In particular, this will result in PrettyStackTrace messages being
included in crash logs when SourceKit crashes on Apple platforms.

(cherry picked from commit fb8c815)
jrose-apple added a commit that referenced this pull request Jun 14, 2018
In particular, this will result in PrettyStackTrace messages being
included in crash logs when SourceKit crashes on Apple platforms.

(cherry picked from commit fb8c815)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants