]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-87804: Fix counter overflow in statvfs on macOS (#99570)
authorRonald Oussoren <ronaldoussoren@mac.com>
Sat, 10 Feb 2024 10:16:45 +0000 (11:16 +0100)
committerGitHub <noreply@github.com>
Sat, 10 Feb 2024 10:16:45 +0000 (11:16 +0100)
commit6e222a55b1d63de994a2ca39afd4bbf4d2fbdd34
tree298b32e8b20434cd1852a0970659636dd9141602
parente19103a346f0277c44a43dfaebad9a5aa468bf1e
GH-87804: Fix counter overflow in statvfs on macOS (#99570)

On macOS the statvfs interface returns block counts as
32-bit integers, and that results in bad reporting for
larger disks.

Therefore reimplement statvfs in terms of statfs, which
does use 64-bit integers for block counts.

Tested using a sparse filesystem image of 100TB.
Misc/NEWS.d/next/macOS/2022-11-18-10-05-35.gh-issue-87804.rhlDmD.rst [new file with mode: 0644]
Modules/posixmodule.c