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

Failure on non-ASCII path on windows #9618

Closed
ling0322 opened this issue Sep 30, 2013 · 9 comments
Closed

Failure on non-ASCII path on windows #9618

ling0322 opened this issue Sep 30, 2013 · 9 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-windows Operating system: Windows

Comments

@ling0322
Copy link

I try to compile this program in rustc but an internal compile error occurred that:

task <unnamed> failed at 'assertion failed: is_utf8(v)', C:\bot\slave\dist2-win\build\src\libstd\str.rs:1032
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 to get further details and report the results to github.com/mozilla/rust/issues
task <unnamed> failed at 'explicit failure', c:\bot\slave\dist2-win\build\src\librustc\rustc.rs:391

this is my program:

extern mod extra;
use extra::json::ToJson;

fn main () {
  let l = ~[1, 2, 3, 4];
  println(l.iter().filter(|&x| *x > 2).map(|&x| x).to_owned_vec().to_json().to_str());
}

This error occurred both in Windows 8.1 64bit and windows XP 32bit.

@huonw
Copy link
Member

huonw commented Sep 30, 2013

Hi, thanks for the report! What is the file name of the program you are running? (I have a feeling this may be because of #7188 and/or #7225.)

@ling0322
Copy link
Author

test.rs

@ling0322
Copy link
Author

Oh i know the problem! The path to this file is C:\Documents and Settings\Administrator\桌面\test\test.rs since my language is Simplified Chinese :-P

@klutzy
Copy link
Contributor

klutzy commented Sep 30, 2013

Simpler test case: $ mkdir ♡ && cd ♡ && touch empty.rs && rustc.exe empty.rs
Seems that we use ANSI function on win32.

@klutzy
Copy link
Contributor

klutzy commented Sep 30, 2013

So I think this is not duplication of #7188/#7225, which argue inherently non-unicode bytes. @ling0322 could you re-open this?

@huonw huonw reopened this Sep 30, 2013
@huonw
Copy link
Member

huonw commented Sep 30, 2013

(cc @kballard)

@klutzy's test case works on linux, fwiw.

bors added a commit that referenced this issue Oct 18, 2013
This fixes #9418 and #9618, and potential problems related to directory walking.
bors added a commit that referenced this issue Oct 20, 2013
This fixes #9418 and #9618, and potential problems related to directory walking.
@adrientetar
Copy link
Contributor

@huonw #9812 supposedly fixed this, still relevant?

@klutzy
Copy link
Contributor

klutzy commented Oct 26, 2013

This is fixed: #9812 contains some tests similar to this. (Also, my testcase above works now.)

@alexcrichton
Copy link
Member

hurray!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

5 participants