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

Panic on windows7 when resolving an inline #577

Closed
roblabla opened this issue Nov 15, 2023 · 1 comment · Fixed by #578
Closed

Panic on windows7 when resolving an inline #577

roblabla opened this issue Nov 15, 2023 · 1 comment · Fixed by #578

Comments

@roblabla
Copy link
Contributor

roblabla commented Nov 15, 2023

Since #569 was merged, Backtrace::resolve panics on Windows 7 due to unwrapping an Option set to None. After some further instrumentation, I was able to find out the source of the problem: Failed to find SymAddrIncludeInlineTrace in dbghelp. This makes the capture::tests::test_frame_conversion unit test fail on Windows 7.

This is because Windows7 ships dbghelp.dll version 6.1, but SymAddrIncludeInlineTrace was added in dbghelp.dll version 6.2.

This affects the Rust stdlib Backtrace as well, see rust-lang/rust#117941

@ChrisDenton
Copy link
Contributor

Ah, sorry about that. dbghelp.dll version 6.2 does apparently support Windows 7 but isn't distributed with it.

Easiest fix would be to use something like (*dbghelp.dbghelp()).SymAddrIncludeInlineTrace().is_none() to switch back to the old way if the symbol isn't found.

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 a pull request may close this issue.

2 participants