Skip to content

Use 64-bit fields for fsblkcnt_t and fsfilcnt_t #24769

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

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jul 22, 2025

We were running into issues where some of our bots were reporting numbers larger than 2^32 when calling statfs on the underlying filesystem.

@sbc100 sbc100 requested a review from dschuff July 22, 2025 23:14
@sbc100 sbc100 changed the title Use 64-bit fields for fsblkcnt_t and fsfilcnt_t. NFC Use 64-bit fields for fsblkcnt_t and fsfilcnt_t Jul 22, 2025
@sbc100 sbc100 enabled auto-merge (squash) July 22, 2025 23:38
We were running into issues where some of our bots were reporting
numbers larger than 2^32 when calling statfs on the underlying
filesystem.
@kleisauke
Copy link
Collaborator

Note that this is an ABI break. Rust had a lot of issues with the previous stat-related ABI break, see e.g. #19569 (comment) and rust-lang/rust#131467. Though, I haven't yet verified whether the same applies to the statfs and statvfs structs.

@kleisauke
Copy link
Collaborator

PR #24773 (which is split from #13007) makes updating alltypes.h a bit easier. That is, you only have to remove these two:


and regenerate alltypes.h using update_alltypes.sh.

@sbc100
Copy link
Collaborator Author

sbc100 commented Jul 23, 2025

Note that this is an ABI break. Rust had a lot of issues with the previous stat-related ABI break, see e.g. #19569 (comment) and rust-lang/rust#131467. Though, I haven't yet verified whether the same applies to the statfs and statvfs structs.

True, that is why I mention in the ChangeLog. Note that we don't (currently) make any guarantees that object files and libraries built with one version of emscripten can be used by another version.

@sbc100 sbc100 requested a review from kripken July 23, 2025 15:17
@sbc100
Copy link
Collaborator Author

sbc100 commented Jul 23, 2025

PR #24773 (which is split from #13007) makes updating alltypes.h a bit easier. That is, you only have to remove these two:

and regenerate alltypes.h using update_alltypes.sh.

Maybe lets land this first, then the new .in files will be two lines shorter.

@kleisauke
Copy link
Collaborator

Though, I haven't yet verified whether the same applies to the statfs and statvfs structs

Grepping for these structs in Rust returned no results, so it's likely/hopefully safe.

@sbc100 sbc100 disabled auto-merge July 23, 2025 20:41
@sbc100 sbc100 merged commit af67939 into emscripten-core:main Jul 23, 2025
28 of 30 checks passed
@sbc100 sbc100 deleted the statfs_int64 branch July 23, 2025 20:41
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