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

creation of anyhow error with backtrace enabled causes unloading fail #7

Closed
xxshady opened this issue Jan 17, 2025 · 2 comments · Fixed by #15
Closed

creation of anyhow error with backtrace enabled causes unloading fail #7

xxshady opened this issue Jan 17, 2025 · 2 comments · Fixed by #15
Labels
bug Something isn't working

Comments

@xxshady
Copy link
Owner

xxshady commented Jan 17, 2025

reproduction:

  1. cargo add anyhow --features backtrace
#[relib_module::export]
pub fn main() {
  let err = anyhow::anyhow!("err");
  println!("[module] hello world\n{err:?}");
}
  1. run host with RUST_BACKTRACE=1

UPD: turns out the reason of this is std backtrace, more short repro:

#[relib_module::export]
pub fn main() {
  let backtrace = std::backtrace::Backtrace::force_capture();
  let _ = dbg!(backtrace);
}
@xxshady xxshady added the linux label Jan 17, 2025
@xxshady
Copy link
Owner Author

xxshady commented Jan 17, 2025

doesn't happen on windows though

@xxshady xxshady added the bug Something isn't working label Jan 20, 2025
@xxshady
Copy link
Owner Author

xxshady commented Jan 21, 2025

nevermind, there is kinda similar issue on windows (it was hidden because currently there is no "final unloading check" on windows)

@xxshady xxshady removed the linux label Jan 21, 2025
@xxshady xxshady linked a pull request Feb 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant