-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Segfault when calling a method on an owned box cast to a trait and passed to another task #5882
Comments
Nominating for production-ready. This code today actually produces an LLVM assertion as well:
|
This is actually more general, with the assertion happening on pretty much any instance of an owned trait object. I would suggest this be feature-complete, since trait objects are a feature, and clearly this is not complete. |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Aug 11, 2020
… r=Manishearth Prevent compile parts of rustc when using `cargo dev ra-setup` Currently after running `cargo dev ra-setup` the following lines are added to `Cargo.toml`: ```toml [target] rustc_data_structures = { path = ".../rust/src/librustc_data_structures" } rustc_driver = { path = ".../rust/src/librustc_driver" } rustc_errors = { path = ".../rust/src/librustc_errors" } rustc_interface = { path = ".../rust/src/librustc_interface" } rustc_middle = { path = ".../rust/src/librustc_middle" } ``` This pull request adds dependencies for `rustc` crates under `cfg(NOT_A_PLATFORM)`, thus preventing them from compiling together with clippy: ```toml [target.'cfg(NOT_A_PLATFORM)'.dependencies] rustc_data_structures = { path = ".../rust/src/librustc_data_structures" } rustc_driver = { path = ".../rust/src/librustc_driver" } rustc_errors = { path = ".../rust/src/librustc_errors" } rustc_interface = { path = ".../rust/src/librustc_interface" } rustc_middle = { path = ".../rust/src/librustc_middle" } ``` --- This approach was [originally proposed for IntelliJ Rust](intellij-rust/intellij-rust#1618 (comment)), and looks like it works for rust-analyzer too. changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This program compiles successfully, but segfaults:
The crash occurs in a generated thunk opaque to gdb:
The text was updated successfully, but these errors were encountered: