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

Pair SymCleanup with calls to SymInitializeW #175

Merged
merged 3 commits into from
May 9, 2019
Merged

Conversation

alexcrichton
Copy link
Member

This commit fixes #165 by ensuring that we call SymCleanup on Windows. This additionally attempts to mitigate the accompanying performance loss by ensuring that we initialize/cleanup less often when called within scopes of this library. This is extracted from #172 with some cleanup/refactoring.

aloucks and others added 3 commits May 9, 2019 08:18
This will rely on external synchronization but we'll still keep an
internal counter to make sure we don't initialize more than once.
Performance optimizations for `Backtrace` will come in a later commit.

Additionally don't succeed initialization if `SymInitializeW` failed for
now, but we can catch it later if necessary in the future.
This commit amortizes the cost of `Backtrace` on Windows by quite a bit
by ensuring that `SymInitializeW` is only called once when `Backtrace`
is used rather than lots of times recursively. This is purely a
performance optimization, however, and shouldn't affect correctness of
other users.
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.

Capturing a backtrace prevents any future panic from printing a backtrace on Windows
2 participants