-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
#[plugin_registrar] is not type-checked #14841
Comments
Working on this. |
My fix above is gross; let's do #17833 instead. |
Updated code to reproduce: // plugin_lib.rs
#![feature(plugin_registrar)]
#[plugin_registrar]
pub fn plugin_registrar(f: fn() -> ()) {
f()
} and // plugin_test.rs
#![feature(plugin)]
#![plugin(plugin_lib)]
fn main() {
()
} testing: $ rustc plugin_lib.rs --crate-type=dylib
$ rustc plugin_test.rs -L .
Segmentation fault
$ rustc --version
rustc 1.7.0-nightly (2370d461a 2015-12-30) |
With |
Actually, I think that was a problem with my shell, presumably... I'm not sure it segfaults, but it doesn't successfully compile |
When this issue was opened, we weren't sure what the system for extending rust may be. Plugins are never going to be shown to end-users, and so I don't believe this is ever going to be fixed. Closing. |
#[plugin_registrar]
functions are not type-checked, which exposes unsafe memory content to the plugin modules. Nor are they checked for beingpub
.I could reproduce this on the latest nightly build for x64 linux. Minimal reproducing example follows.
plugin_lib.rs :
plugin_test.rs :
compilation:
The text was updated successfully, but these errors were encountered: