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
When running with rust from 2014-03-21 (2014032104056eae7dfsaucy) on Ubuntu, the output file in this example is only 2147479552 bytes, whereas it should be exactly 4000000000 bytes.
This was fixed on 2014-03-25 in 2014032104056eae7dfsaucy. However, one can induce failure by forcing libgreen, via:
the issue appears to be a mismatch in the type given and taken to/by libuv.
@eddyb pinged the libuv folks, who said this aspect has recently changed and Rust should upgrade before working around the current code. uv_fs_write apparently takes an array of buffers now, in particular.
The text was updated successfully, but these errors were encountered:
The libuv fs wrappers are very thin wrappers around the syscalls they correspond
to, and a notable worrisome case is the write syscall. This syscall is not
guaranteed to write the entire buffer provided, so we may have to continue
calling uv_fs_write if a short write occurs.
Closes#13130
Avoid ref when using format!
Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing).
Inlining format args prevents accidental `&` misuse.
See also rust-lang#112156
changelog: none
It seems libgreen cannot write large files. See the gist at:
https://gist.github.com/tfogal/9762303#file-simple-rs
See specifically the 'dumpf32' implementation.
When running with rust from 2014-03-21 (201403210405
6eae7dfsaucy) on Ubuntu, the output file in this example is only 2147479552 bytes, whereas it should be exactly 4000000000 bytes.This was fixed on 2014-03-25 in 201403210405
6eae7dfsaucy. However, one can induce failure by forcing libgreen, via:extern crate green;
extern crate rustuv;
...
#[start]
fn start(argc: int, argv: **u8) -> int { green::start(argc, argv, main) }
The 'rustuv' is critical to prevent an early crash calling "
Result::unwrap()
on anErr
value, but it limits the output file size as above.From talking with @huonw and @eddyb on IRC, this appears to be an issue with libuv. eddyb pinpointed it to:
https://github.com/mozilla/rust/blob/master/src/librustuv/uvll.rs#L371-L384
the issue appears to be a mismatch in the type given and taken to/by libuv.
@eddyb pinged the libuv folks, who said this aspect has recently changed and Rust should upgrade before working around the current code.
uv_fs_write
apparently takes an array of buffers now, in particular.The text was updated successfully, but these errors were encountered: