Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upstd::os::unix::fs::MetadataExt::size() silently truncates file size on Android #28978
Comments
This comment has been minimized.
This comment has been minimized.
|
There's not really a whole lot we can do here. Options are:
|
This comment has been minimized.
This comment has been minimized.
|
Making |
This comment has been minimized.
This comment has been minimized.
|
Unfortunately |
This comment has been minimized.
This comment has been minimized.
|
There isn't any hard requirement that |
This comment has been minimized.
This comment has been minimized.
|
I would personally be worried about someone binding a C API that looked like: off_t foo(ptr_t *p);Where when transcribed into Rust with the |
This comment has been minimized.
This comment has been minimized.
|
Are you sure Android It sure looks like bionic's
Where FWIW, I confirmed on my Nexus 9, So I wouldn't worry about someone binding some other C API with |
This comment has been minimized.
This comment has been minimized.
|
Note that Android only got |
This comment has been minimized.
This comment has been minimized.
|
Ah, that's too bad. At least they've had most of the explicit LFS functions for a while, around late 2010, as well as 64-bit |
This comment has been minimized.
This comment has been minimized.
|
Ah yeah the headers I was looking at didn't have these #defines (something about android version 18?). Although it's probably not the end of the world on Android as a platform just yet! |
steveklabnik
added
A-libs
O-android
labels
Oct 29, 2015
This comment has been minimized.
This comment has been minimized.
|
I've now opened an RFC which I hope will help enable us to fix this issue in a "backwards-compatible" fashion |
eefriedman commentedOct 12, 2015
The implementation of size() looks like this:
The field
st_sizehas typec_longlong, and the typeraw::off_thas typei32on 32-bit Android. The combination doesn't work well.