RFR: 8214077: test java/io/File/SetLastModified.java fails on ARM32
Nick Gasson
Nick.Gasson at arm.com
Wed Nov 21 02:46:48 UTC 2018
Hi,
Can someone please help me review this small makefile patch to
fix an issue with java.io.File::setLastModified on 32-bit
systems?
https://bugs.openjdk.java.net/browse/JDK-8214077
http://cr.openjdk.java.net/~njian/8214077/webrev.0/
If the file size is > 2GB so that the size won't fit in a signed
32-bit off_t all stat() calls will fail with EOVERFLOW. This causes
the native method UnixFileSystem::setLastModifiedTime to fail as it
uses stat() to preserve the access time. It also causes other methods
like File::length and File::lastModified to return 0.
Fix by defining _FILE_OFFSET_BITS=64 when building
UnixFileSystem_md.c, this will make off_t 64 bits.
Found on ARM32 but I believe this affects 32-bit x86 too. Checked for
no new Jtreg regressions with this patch.
Thanks,
Nick
More information about the build-dev
mailing list