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 library crate #4260

Closed
jesse99 opened this issue Dec 23, 2012 · 4 comments
Closed

ICE with library crate #4260

jesse99 opened this issue Dec 23, 2012 · 4 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries A-metadata Area: Crate metadata I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Milestone

Comments

@jesse99
Copy link
Contributor

jesse99 commented Dec 23, 2012

Getting an ICE trying to use rparse with 0.5. Annoyingly it only happens when I actually use the rparse library: if I simply paste the relevant rparse code into my test case it compiles fine. Here is the test case. It assumes that you have rparse d5baebecf681870b4f06660968c15c7d823b3cfe available (rparse doesn't have any dependencies so it should be simple to build):

#[allow(non_implicitly_copyable_typarams)];

extern mod std;

extern mod rparse (name = "rparse", vers = "0.6");
use rparse::{StringParsers, seq2};

priv fn langtag()
{
    let suffix = do seq2("oh".lit(), "noes".lit()) 
        |_l, _name| {result::Ok(~"-")};
    fmt!("%?", suffix);
}

//RUST_LOG=rustc=1,::rt::backtrace rustc -L . --test rparse_ice.rs
//rust: task failed at 'Key not found in table: 5331', /Users/jessejones/Source/Third_Party/rust/src/librustc/rustc.rc:1
//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', /Users/jessejones/Source/Third_Party/rust/src/librustc/rustc.rc:425
//rust: domain main @0x7f8134800010 root task failed
//rust: task failed at 'killed', /Users/jessejones/Source/Third_Party/rust/src/libcore/task/mod.rs:570
//make: *** [rparse_ice] Error 101
//exited with code 2

// Note that there is no ICE if the seq2+ret code is pasted into here (and given new names like seq2b and retb).
// Also the ICE happens with rparse optimizations on and off (on is the default).
@jesse99
Copy link
Contributor Author

jesse99 commented Dec 23, 2012

Haven't found a good workaround. The only one I have found is to transitively copy functions from the library into my crate until it stops ICEing.

@jesse99
Copy link
Contributor Author

jesse99 commented Dec 23, 2012

Wound up copying 660 lines of code from rparse into rrdf. I'd say that makes rparse essentially unusable with rust 0.5.

@catamorphism
Copy link
Contributor

Unfortunately, rparse is a few months out-of-date and it would be non-trivial for me to update this to try to reproduce it. Hate to drop a possible bug on the floor, but I'm going to have to close this; reopen or file a new bug if you can reproduce it with a small example that compiles on trunk. Thanks.

@catamorphism
Copy link
Contributor

Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries A-metadata Area: Crate metadata I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants