-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
rustc stack overflow: pub use super::*
in public inner mod.
#21601
Comments
Yuck metadata. Could you give the code at least? |
I don't have time to make a minimal example, you can reproduce the bug with Regex seems broken for now but you can just remove the dependency to term in the Cargo.toml, it'll stack overflow anyways.
|
Minimal example: LibA (libA/lib.rs):
LibB (libB/lib.rs):
Compilation:
|
pub use super::*
in public mod.
pub use super::*
in public mod.pub use super::*
in public inner mod.
|
I just tried this, and it still stack overflow with |
Hmm, this now gives
I haven't kept up with syntax extensions to know how to update this example. |
libB/lib.rs becomes: #![crate_type = "dylib"]
#![feature(rustc_private)]
extern crate syntax;
// One of the following item produces a `stack overflow` of rustc if
// one is commented. It's weird that it works with Deref.... The three cases:
// OK
// extern crate attribute;
// use std::ops::Deref;
// KO
extern crate attribute;
// use std::ops::Deref;
// OK
// // extern crate attribute;
// use std::ops::Deref;
pub use std::string::String;
pub use syntax::ast::Ident;
pub fn id_to_string(id: Ident) -> String
{
id.to_string()
} And I have this error: ➜ libB rustc lib.rs --extern attribute=../libA/libattribute.so
error: cannot satisfy dependencies so `std` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `core` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `collections` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `rustc_unicode` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `alloc` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `rand` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `libc` only shows up once
help: having upstream crates all available in one format will likely make this go away
error: cannot link together two allocators: alloc_jemalloc and alloc_system
error: aborting due to 8 previous errors But I guess this is unrelated and that I am compiling it wrong... |
@ptal syntax extensions change all the time, and I can't figure out what "attribute" was here. Are you still seeing this bug? |
oh, looks like attribute is https://github.com/ptal/Rust.attribute which no longer compiles. I'm going to consider this one stale and give it a close, if you can reproduce today, please let me know! |
The RUST_BACKTRACE=1 doesn't generate anything. I ran the compiler with valgrind and the output can be found here http://pastebin.com/TUE2WznG
The text was updated successfully, but these errors were encountered: