-
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
ICE: opaque error when destination directory doesn't exist #12865
Comments
Would you mind specifying what set of tests you were trying to build? Which test fail specifically? etc. |
If you can get a backtrace from the |
FlaPer87: Sorry, I wasn't very specific. I have a test suite for an application I am writing, i.e. these aren't rust-lang tests that are failing, they are my own. The test suite is failing to build and execute because of the error. huonw: I'll be able to try to do some more debugging in about 8 hours. I've not run rust under GDB yet, but once I'm able to figure out which file is causing this error, I'll post the backtrace. |
Why rustc doesn't print this information even on failed?
|
The compiler is failing with the following code. I am only able to trigger the error when I try to compile with the test: #[crate_type = "lib"];
#[crate_id = "encode64#0.1"];
#[desc = "Encode hex messages as base64"];
extern crate serialize;
use serialize::base64::{ToBase64, STANDARD};
use serialize::hex::{FromHex};
/// given a string, convert that string to a base64 encoded string.
pub fn encode(to_encode: ~str) -> ~str {
to_encode.from_hex().unwrap().to_base64(STANDARD)
}
#[test]
fn using_encode(){
let input = ~"49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d";
let expected = "SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t";
let result = encode(input);
assert_eq!(result, expected.to_owned());
} |
What version of the compiler are you using? That example compiles ok for me both with and without |
Hi Alex - Sorry for the delay, I've been out of town. checkout: d84a2e4353db019998c20bb11dff4e11b48bbab5 I'm going to nuke the version and rebuild. I'm using homebrew --HEAD, so I may have gotten a broken intermediate build (though I doubt this, as it is master). |
Hi - I think I've found the issue. I nuked and rebuilt from master last night, and the issue still presented itself. But, I noticed that that the directory from which I wanted to run my tests did not exist. My makefile was trying to create the test binary in a directory that did not exist. Once the directory was created, the issue no longer presented itself. My apologies for the mix up. If you'd like any other information I would be happy to provide it. I also changed the code to this: #[crate_type = "lib"];
#[crate_id = "encode64#0.1"];
#[desc = "Encode hex messages as base64"];
extern crate serialize;
use serialize::base64::{ToBase64, STANDARD};
use serialize::hex::{FromHex};
pub fn encode(to_encode: &str) -> ~str {
let hexed = to_encode.from_hex();
if hexed.is_ok() {
hexed.unwrap().to_base64(STANDARD)
}
else {
~"error found in hexing"
}
}
#[test]
fn using_encode(){
let input = ~"49276d206b696c6c696e6720796f757220627261696e206c696b65206120\
706f69736f6e6f7573206d757368726f6f6d";
let expected = ~"SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2\
hyb29t";
let result = encode(input);
assert_eq!(result, expected);
} Thanks. |
Option::unwrap()
on a None
value
Updated title and description |
I'm working on a PR for this. If I'm not mistaken, the affected section just seems to be librustc/lib.rs. |
I've created a PR for this: #13110 |
While working on this, I've noticed that I can only reproduce the bug on OS X. I ran the test 1000 times on my ubuntu build, and each time it produced the correct error and not the ICE. I've had enormous difficulty getting debug information that I can use on OS X. I've tried building using RUSTFLAGS="-g" with VERBOSE=1 to check if the build is setting debug flags. It shows it as building with debug information, however gdb doesn't ever seem to be able to find the symbols. |
fix [`redundant_closure`] suggesting incorrect code with `F: Fn()` fixes: rust-lang#12853 --- changelog: fix [`redundant_closure`] suggesting incorrect code with `F: Fn()`
Updated description
That's a pretty awful error to hand out for a common-ish error
Original Issue
This is a bug report.
I received the following error when building a set of tests.
I have, as of yet, not been able to reproduce the error with a single specific piece of code. I will continue to try and update the ticket once I have done so.
The text was updated successfully, but these errors were encountered: