> >> Have you looked at replacing the remaining usages of stat changed to > >> stat64 instead? > > I've tried this just now and it also resolves the issue. I can > > test on some more platforms and update the webrev if this is the > > preferred solution? > I'd say this is preferred to adding compiler flags, yes. The code will > make it unambiguously clear that it's correct.
Here is the updated webrev that uses stat64: http://cr.openjdk.java.net/~njian/8214077/webrev.1/ Thanks, Nick > -----Original Message----- > From: Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com> > Sent: 21 November 2018 20:00 > To: Nick Gasson <nick.gas...@arm.com>; Alan Bateman > <alan.bate...@oracle.com>; build-dev <build-...@openjdk.java.net>; core- > libs-...@openjdk.java.net > Cc: nd <n...@arm.com> > Subject: Re: RFR: 8214077: test java/io/File/SetLastModified.java fails on > ARM32 > > On 2018-11-21 11:08, Nick Gasson wrote: > > > Hi Alan, > > > >> Have you looked at replacing the remaining usages of stat changed to > >> stat64 instead? > > I've tried this just now and it also resolves the issue. I can > > test on some more platforms and update the webrev if this is the > > preferred solution? > I'd say this is preferred to adding compiler flags, yes. The code will > make it unambiguously clear that it's correct. > > /Magnus > > > > Thanks, > > Nick > > > >> -----Original Message----- > >> From: Alan Bateman <alan.bate...@oracle.com> > >> Sent: Wednesday, November 21, 2018 4:55 PM > >> To: Nick Gasson <nick.gas...@arm.com>; build-dev <build- > >> d...@openjdk.java.net>; core-libs-dev@openjdk.java.net > >> Cc: nd <n...@arm.com> > >> Subject: Re: RFR: 8214077: test java/io/File/SetLastModified.java fails on > >> ARM32 > >> > >> On 21/11/2018 02:46, Nick Gasson wrote: > >>> 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. > >>> > >> Have you looked at replacing the remaining usages of stat changed to > >> stat64 instead? > >> > >> -Alan