RFR: 8214077: test java/io/File/SetLastModified.java fails on ARM32

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Wed Nov 21 12:00:09 UTC 2018


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.Bateman at oracle.com>
>> Sent: Wednesday, November 21, 2018 4:55 PM
>> To: Nick Gasson <Nick.Gasson at arm.com>; build-dev <build-
>> dev at openjdk.java.net>; core-libs-dev at openjdk.java.net
>> Cc: nd <nd at 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




More information about the build-dev mailing list