http://bugs.winehq.org/show_bug.cgi?id=29706
Bug #: 29706 Summary: GetDiskFreeSpaceEx() returns negative sizes for large drives Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: fgouget@codeweavers.com Classification: Unclassified
When faced with a partition that has more than 1TB of free disk space it looks like this API returns a negative value. Apparently this happened on OpenSUSE 11.4 64bit with a 32bit Wine; but not being fortunate enough to have this much free disk space I cannot verify this.
I suspect some Unix API we call returns the free disk size in block of 512 bytes, thus overflowing at 2^31-1 blocks which is about 1TB. Then GetDiskFreeSpaceEx() takes that and returns a negative free disk space.
Note that GetDiskFreeSpaceEx() returns 64bit values so there's no obstable to it handle such large disks in theory.
http://bugs.winehq.org/show_bug.cgi?id=29706
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|ntdll |-unknown Version|unspecified |1.3.37 Severity|normal |minor
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru 2012-01-25 11:12:56 CST --- Is there an application or a test case that suffers from this?
http://bugs.winehq.org/show_bug.cgi?id=29706
--- Comment #2 from François Gouget fgouget@codeweavers.com 2012-01-25 13:01:39 CST --- Yes, the Office 2000 installer.
http://bugs.winehq.org/show_bug.cgi?id=29706
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru 2012-01-26 00:46:08 CST --- (In reply to comment #2)
Yes, the Office 2000 installer.
Did you test it under Windows? Do you have a test case?
http://bugs.winehq.org/show_bug.cgi?id=29706
--- Comment #4 from François Gouget fgouget@codeweavers.com 2012-01-26 03:33:09 CST ---
Did you test it under Windows? Do you have a test case?
Answer:
Apparently this happened on OpenSUSE 11.4 64bit with a 32bit Wine; but not being fortunate enough to have this much free disk space I cannot verify this.
http://bugs.winehq.org/show_bug.cgi?id=29706
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
--- Comment #5 from André H. nerv@dawncrow.de 2012-01-28 10:29:37 CST --- maybe a problem with the calculation in NtQueryVolumeInformationFile, hard to test...
http://bugs.winehq.org/show_bug.cgi?id=29706
Myk Taylor myk002@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |myk002@yahoo.com
--- Comment #6 from Myk Taylor myk002@yahoo.com 2012-06-27 01:26:05 CDT --- If you need an example app that is affected, I've found Deus Ex cannot start from a partition that has a large amount of free disk space. The installer fails as well. I remote mount my home directory from a NAS that has about 4 terabytes free. If there are any proposed fixes to this problem, I'd be happy to test them.
http://bugs.winehq.org/show_bug.cgi?id=29706
--- Comment #7 from Myk Taylor myk002@yahoo.com 2012-06-27 10:38:25 CDT --- hrm, this may not be the problem. wine's implementation of the dir command for the cmd executable uses GetDiskFreeSpaceExW to get the disk free status line, and that works just fine for my 4TB free. Perhaps it is the DeusEx executable itself that cannot handle the large value.
Update: hacking GetDiskFreeSpaceEx (and GetDiskFreeSpace) to limit the magnitude of the values returned doesn't seem to help. DeusEx must be using some other mechanism to get the free disk space.
https://bugs.winehq.org/show_bug.cgi?id=29706
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Installer CC| |focht@gmx.net Summary|GetDiskFreeSpaceEx() |Multiple applications fail |returns negative sizes for |to install on drives with |large drives |large amount of free disk | |space (MS Office 2000, Deus | |Ex) (GetDiskFreeSpaceEx() | |returns negative sizes)
--- Comment #8 from Anastasius Focht focht@gmx.net --- Hello folks,
can you retest? Refining summary.
Regards
https://bugs.winehq.org/show_bug.cgi?id=29706
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |ABANDONED
--- Comment #9 from Austin English austinenglish@gmail.com --- (In reply to Anastasius Focht from comment #8)
Hello folks,
can you retest? Refining summary.
Regards
Abandoned.
https://bugs.winehq.org/show_bug.cgi?id=29706
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Austin English austinenglish@gmail.com --- Closing.