bugmake - Bugs: bug #58656, Cannot handle over 2GB file on...

 
 

bug #58656: Cannot handle over 2GB file on Windows

Submitter:  Makoto Kato <mkato>
Submitted:  Fri 26 Jun 2020 09:05:07 AM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  Fixed Privacy:  Public
Assigned to:  eliz Open/Closed:  Closed
Component Version:  4.4 Operating System:  MS Windows
Fixed Release:  4.4 Triage Status:  Small Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 29 May 2021 08:40:14 AM UTC, comment #6: 

Thanks, I installed a slightly modified version of your second patch.

Eli Zaretskii <eliz>
Group Member
Thu 27 May 2021 05:21:08 AM UTC, comment #5: 

Sorry for delay. I have missed your comment.

comment #4:

> Sorry, I failed to respond at the time.
>
> The second variant is better, but it seems to affect only MSVC builds?  What about MinGW64 builds?
>


This is MSVC runtime only. When I use MSYS2/MingW64, stat returns 0 even if file size is over 2GB.

Makoto Kato <mkato>
Mon 07 Dec 2020 05:53:40 PM UTC, comment #4: 

Sorry, I failed to respond at the time.

The second variant is better, but it seems to affect only MSVC builds?  What about MinGW64 builds?

Eli Zaretskii <eliz>
Group Member
Mon 07 Dec 2020 05:57:15 AM UTC, comment #3: 

@eliz did you have any comments on the second form of this patch or should I apply it?

Cheers!

Paul D. Smith <psmith>
Group administrator
Thu 16 Jul 2020 06:38:11 AM UTC, comment #2: 

comment #1:

> Thanks.
>
> However, this change cannot be unconditional even on MS-Windows, because _stati64 and 'struct _stat64' are not available on all versions of Windows.
>
> Also, AFAIK _stati64 accepts an argument of type 'struct stati64', not 'struct _stat64', see
>
>   https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions?view=vs-2019
>
> Would you like to modify the patch to fix the above 2 issues?


Updated fix with VC version check and using _stat64. Do you have any comment?

Makoto Kato <mkato>
Fri 26 Jun 2020 10:39:40 AM UTC, comment #1: 

Thanks.

However, this change cannot be unconditional even on MS-Windows, because _stati64 and 'struct _stat64' are not available on all versions of Windows.

Also, AFAIK _stati64 accepts an argument of type 'struct stati64', not 'struct _stat64', see

  https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions?view=vs-2019

Would you like to modify the patch to fix the above 2 issues?

Eli Zaretskii <eliz>
Group Member
Fri 26 Jun 2020 09:05:07 AM UTC, original submission:  

Actually, windows version uses stat when checking mtime. But stat
returns -1 when file size is over 2GB. So we should use _stati64 instead.

Makoto Kato <mkato>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #49375:  0001-make-cannot-handle-over-2GB-file-on-Windows.patch added by mkato (1KiB - application/octet-stream - fix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by eliz (Posted a comment)
  • -email is unavailable- added by mkato (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-29 eliz StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.4
    2020-07-06 mkato Attached File- Added 0001-make-cannot-handle-over-2GB-file-on-Windows.patch, #49438
    2020-06-26 eliz Item GroupBug Enhancement
        Assigned toNone eliz
        Triage StatusNone Small Effort
    2020-06-26 mkato Attached File- Added 0001-make-cannot-handle-over-2GB-file-on-Windows.patch, #49375

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code