-
Notifications
You must be signed in to change notification settings - Fork 254
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
<no info> frames on Windows when using unresolved backtraces since 0.3.16 #197
Comments
This commit updates the MSVC code to leak `dbghelp.dll` on Windows after we initially load it. This allows for cheaper reuse between invocations and avoids each backtrace call having to load/unload an entire DLL. While not profiled just yet given #197 we're going to have to preserve *something* across calls in and out of this library, so this is going to be a first required step in any case to doing so.
Thanks for the report! This regression is due to #175 I believe with some local testing. As with a number of other platforms there's an initialization and a cleanup step for the library we're using to handle debuginfo. On Windows this is The purpose of #175 was to pair initialize/cleanup calls. What's happening here though is that information (the backtrace frames) are persisted across initialize/cleanup pairs. Namely the frames captured during I'm not really sure what the best solution for this is, but I think that we need to move towards a model where the symbols are initialized once and only once. That's really the only way to get this to work, and it should also be faster in general. Coordinating with the standard library is the tricky part, however. |
cc @aloucks, you may be interested in this as well |
Interesting. I can't reproduce this @udoprog Do all of the unit tests pass for you? Out of curiosity, if you put Finally, what version of MSVC are you using? I'm using the 2017 MSVC build tools. |
@udoprog Sorry, I had mistakenly run git pull and overlooked that #198 was just merged. I can reproduce it on master prior to that change. @alexcrichton What's the motivation behind dynamically loading dbghelp? Also, could it be unloaded with |
Oh wow I thought I tested it but apparently not well enough, glad that works! In that case I'll go ahead and close :) @aloucks I tried to dig up the rationale but all I could find was the original implementation (by me). IIRC the mingw toolchain just didn't work with Unfortunately |
You're awesome. Thank you! |
failure::Error
uses unresolved backtraces (resolved lazily) which seems to be broken in recent versions of the backtrace crate.The following program on Windows msvc using backtrace versions
0.3.16 - 0.3.28
(rustc 1.37.0-nightly (7840a0b75 2019-05-31)
):Produces the following backtrace:
0.3.15
produces the correct backtrace, so it seems the regression was introduced in0.3.16
:The text was updated successfully, but these errors were encountered: