Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent silent abort with File Comparison of files whose size is an exact multiple of 2^32 bytes #257

Merged
merged 1 commit into from
Jan 26, 2020

Conversation

GreyMerlin
Copy link
Contributor

Prevent silent abort with File Comparison of files whose size is an exact multiple of 2^32 bytes

  • File size values that were all zero in the low 32 bits were assumed to be empty,
    and thus did not have some critical pointers initialized. This resulted in WinMerge
    silently aborting with no message.

  • WinMerge will now properly continue, but will likely display an "Out of memory" error
    message box.

  • I discovered this when attempting to compare two files that are exactly 0x3700000000
    (236,223,201,280‬) bytes long. A pointless exercise of course... Memory eventually fills up
    and an "Out of memory" error is displayed. After clicking "OK", WinMerge terminates the
    comparison, and returns to the "Select Files or Folders" dialog, but does not actually
    release the memory until the program has completely terminated !!

  • Folder Comparison with files of this extreme size does not exhibit this problem.

…xact multiple of 2^32 bytes

* File size values that were all zero in the low 32 bits were assumed to be empty,
   and thus did not have some critical pointers initialized.  This resulted in WinMerge
   silently aborting with no message.

* WinMerge will now properly continue, but will likely display an "Out of memory" error
   message box.

* I discovered this when attempting to compare two files that are exactly 0x3700000000
   (236,223,201,280‬) bytes long.  A pointless exercise of course... Memory eventually fills up
   and an "Out of memory" error is displayed.  After clicking "OK", WinMerge terminates the
   comparison, and returns to the "Select Files or Folders" dialog, but does not actually
   release the memory until the program has completely terminated !!

* Folder Comparison with files of this extreme size does not exhibit this problem.
@GreyMerlin
Copy link
Contributor Author

Note ... This does not seem to have any relation to issue #255 (WinMerge crashes in certain circumstances, and I hope you can fix them)

@sdottaka sdottaka merged commit d0ace11 into WinMerge:master Jan 26, 2020
@sdottaka
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants