-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-codegenArea: Code generationArea: Code generationA-trait-systemArea: Trait systemArea: Trait systemI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Milestone
Description
Updated Test Case (warning: may not be faithful to the original problem)
use core::io::ReaderUtil;
use core::io::Reader;
fn foo(r:@Reader) -> ~str { r.read_line() }
fn baz<R:Reader>(r:R) -> ~str { r.read_line() }
fn waz<R:ReaderUtil>(r:R) -> ~str { r.read_line() }
fn main() {
let _m = foo(io::stdin());
let _m = baz(io::stdin());
let _m = waz(io::stdin());
}
Original Report
The following code compiles, but causes a segmentation fault when run:
let stdin = io::stdin() as &io::ReaderUtil;
let _m = stdin.read_line();
This is using master on Ubuntu.
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-trait-systemArea: Trait systemArea: Trait systemI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.