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

ICE with using a condition from another crate #5446

Closed
sonwow opened this issue Mar 20, 2013 · 7 comments
Closed

ICE with using a condition from another crate #5446

sonwow opened this issue Mar 20, 2013 · 7 comments
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@sonwow
Copy link
Contributor

sonwow commented Mar 20, 2013

Getting an ICE trying to use a condition from another crate.

// condi.rc
#[link(name = "condi",
         vers = "0.1")];
#[crate_type = "lib"];

condition! {
    oops: int -> int;
}

// test.rs
extern mod condi;

fn main() {
    condi::oops::cond.raise(1);
}
  • rustc --lib condi.rc
  • rustc -L . test.rs

ICE

$ RUST_LOG=rustc=1,::rt::backtrace rustc -L . test.rs
rust: task failed at 'lookup_item: id not found: 24', /home/sonwow/project/rust/rust/src/librustc/metadata/decoder.rs:91
/home/sonwow/project/rust/rust/build/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7fca25deaa5b]
/home/sonwow/project/rust/rust/build/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(+0x2a969)[0x7fca25dfb969]
/home/sonwow/project/rust/rust/build/x86_64-unknown-linux-gnu/stage2/bin/../lib/librustrt.so(upcall_fail+0x198)[0x7fca25dec858]
/home/sonwow/project/rust/rust/build/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.6.so(+0xf5cab)[0x7fca27867cab]
......
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /home/sonwow/project/rust/rust/src/librustc/rustc.rc:359

However, there is no error if the condition is in the same crate.

// condi.rs
pub condition! {
    oops: int -> int;
}

// test.rs
pub mod condi;

fn main() {
    condi::oops::cond.raise(1);
}
  • rustc test.rs
@sonwow
Copy link
Contributor Author

sonwow commented Apr 8, 2013

I can't reproduce anymore.

@sonwow sonwow closed this as completed Apr 8, 2013
@sonwow
Copy link
Contributor Author

sonwow commented Apr 26, 2013

There is an ICE again.

@sonwow sonwow reopened this Apr 26, 2013
@brson
Copy link
Contributor

brson commented Apr 26, 2013

Nominating this for a milestone.

@graydon
Copy link
Contributor

graydon commented May 2, 2013

accepted for production ready

(this is happening, if it is, because of linkage address differing from real)

@pnkfelix
Copy link
Member

pnkfelix commented Jun 3, 2013

Narrowing down to something tiny. (Evidence at this point provides hint that there's something wonky with how structs and/or impls with 'self region parameters are being linked.) I will post link to narrower bug after I file it.

@alexcrichton
Copy link
Member

This has been fixed, flagging that it needs a test.

@graydon
Copy link
Contributor

graydon commented Aug 2, 2013

Tests incoming.

oli-obk pushed a commit to oli-obk/rust that referenced this issue May 2, 2020
compare with the second largest instead of the smallest variant

This should make the lint less noisy for now. See [my comment](rust-lang/rust-clippy#5418 (comment)) to issue rust-lang#5418.

---

changelog: none
calebcartwright pushed a commit to calebcartwright/rust that referenced this issue Jan 24, 2023
* Bugfix: Now slash/start comments aren't duplicated on trait parameters.

* Removing unnecesary comment.

* Improvements: Improving the BytePos offset.

* Improvements: Improving the description of the test cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

No branches or pull requests

5 participants