-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
File#pos fails for files greater than java.lang.Integer::MAX_VALUE on 64-bit systems #3664
Comments
Also just realized that this is in File#pos too, not just Tempfile. tmp = File.new("/tmp/demo", "w") (other code is the same) |
Digging in, this looks to be a jnr-posix issue as all the declarations are ints, not longs. Should I cross-post this issue in jnr? https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/util/io/PosixShim.java#L69 |
@byteit101 Yeah we'll need to fix those APIs to be longs. Anything that's using NIO channels only should be long already. |
I just tried this on a 32-bit system, and it worked as expected, which I did not expect |
When writing files greater than 2GiB, the Tempfile#pos value throws an error.
JRuby 9.0.5.0 (2G heap):
MRI:
The text was updated successfully, but these errors were encountered: