This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Fix LO_HI_LONG definition



On 08/07/2016 13:41, Florian Weimer wrote:
> On 07/07/2016 04:03 PM, Adhemerval Zanella wrote:
>>
>>
>> On 07/07/2016 03:56, Florian Weimer wrote:
>>> On 07/06/2016 09:52 PM, Adhemerval Zanella wrote:
>>>> +  /* Create a sparse file larger than 4GB to check if offset is handled
>>>> +     correctly in p{write,read}v64. */
>>>> +  off_t base_offset = UINT32_MAX;
>>>> +  off_t fsize = base_offset + 2048;
>>>> +  if (ftruncate (temp_fd, fsize) != 0)
>>>> +    {
>>>> +      printf ("error: ftruncate (%jd) failed: %m", (intmax_t) fsize);
>>>> +      return 1;
>>>> +    }
>>>
>>> I don't think this is is necessary.  You should be able to write beyond the current EOF and get a sparse file directly.
>>>
>>> I'm not sure if the current tests catch calling convention errors because the read and write offsets could be mangled in the same way. Maybe you can add a test which performs a pwrite with a large offset and check that the file size reported by fstat is as expected?
>>
>> Indeed, I have changed the testcase to check if returned file is indeed what
>> the test expect.
> 
> Test case looks okay to me now.
> 
> I'm not sure about the correctness of the change, sorry.

Thanks, I checked the patch on some different platforms (x86, powerpc64le,
s390, s390x, aarch64, and arm) and test is passing.

I also checked the generated code on the platform that triggered the issue
(MIPS64n32) and syscall wrapper now is doing what pre-consolidation 
implementation were doing.

I will push it today.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]