You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code compiles without any errors with the following command:
$ rustc -Z debug-info parser.rs
If println! on line 15 is commented out the program will print the following error:
$ ./parser parser.rs
task '<main>' failed at 'assertion failed: end <= self.len()', .../rust/src/libstd/vec.rs:1027
Otherwise it will crash with segmentation fault:
$ ./parser parser.rs
HERE
Segmentation fault (core dumped)
And gdb returns the following stack trace:
(gdb) bt
#0 0x000000000041f9f3 in io::buffered::Buffer$BufferedReader::fill::hf78f7f1290b9d770gQaB::v0.0 ()#1 0x00000000004252e8 in io::Buffer::anon::expr_fn::at ()#2 0x00000000004200a1 in condition::Trap::inside::h05e3bde831ab23e82NaU::v0.0 ()#3 0x000000000041fe2b in io::Buffer::read_until::h7807419d82baeae9aQ::v0.0 ()#4 0x000000000041fbcb in io::Buffer::read_line::hd50542f84924c5a2aH::v0.0 () at parser.rs:17#5 0x00000000004291f5 in parser::Iterator$Parser::next () at parser.rs:23#6 0x0000000000429335 in parser::main () at parser.rs:30#7 0x00000000004f8c98 in task::__extensions__::build_start_wrapper::anon::anon::expr_fn::a4 ()#8 0x00000000004ccaa8 in rt::task::__extensions__::run::anon::expr_fn::an ()#9 0x00000000004d402c in rust_try ()#10 0x00000000004cc89d in rt::task::Task::run::hf32c3cb15c069866Qpak::v0.9 ()#11 0x00000000004f86bc in task::__extensions__::build_start_wrapper::anon::expr_fn::aN ()#12 0x0000000000000000 in ?? ()
Warning: the current language does not match this frame.
The text was updated successfully, but these errors were encountered:
Parser::new should not compile, since it is returning a struct containing a borrowed pointer to a BufferedReader that will not last beyond the end of the function.
…-pedantic, r=xFrednet
Move `uninhabited_references` to `nursery`
I think this lint has too many false positives and should be put in pedantic. See rust-lang#11984 and rust-lang#11985 for context.
The lint is already in beta and is causing trouble for us, so I would also like this PR to be backported to beta as well.
changelog: Moved [`uninhabited_references`] to `nursery` (Now allow-by-default)
[rust-lang#11997](rust-lang/rust-clippy#11997)
(Check if this has been backported)
Fixesrust-lang#11984.
I use Rust 0.9 on Ubuntu 12.04.4 LTS x86_64:
I'm not sure if the following code is a correct way to do it but it's surely shouldn't crash with segmentation fault:
The code compiles without any errors with the following command:
If
println!
on line 15 is commented out the program will print the following error:Otherwise it will crash with segmentation fault:
And
gdb
returns the following stack trace:The text was updated successfully, but these errors were encountered: