Fix inode number overflow in readdir test#26207
Merged
brendandahl merged 1 commit intoemscripten-core:mainfrom Feb 3, 2026
Merged
Fix inode number overflow in readdir test#26207brendandahl merged 1 commit intoemscripten-core:mainfrom
brendandahl merged 1 commit intoemscripten-core:mainfrom
Conversation
sbc100
reviewed
Feb 3, 2026
| assert(a_ino > 0); | ||
| assert(b_ino > 0); | ||
| printf("readdir a_ino: %llu, b_ino: %llu\n", (unsigned long long)a_ino, (unsigned long long)b_ino); | ||
| printf("stat a_ino: %llu, b_ino: %llu\n", (unsigned long long)sta.st_ino, (unsigned long long)stb.st_ino); |
Collaborator
There was a problem hiding this comment.
Presumably if we fix the foramt string we don't need those casts?
It looks like ino_t is always 64-bit under emscripten.
sbc100
approved these changes
Feb 3, 2026
The test was failing intermittently on Linux because inode numbers were stored in signed 32-bit integers. On modern Linux filesystems, inode numbers frequently exceed the range of a signed 32-bit integer, leading to narrowing overflows and negative values which triggered assertion failures. This change updates the test to use ino_t (which is 64-bit in Emscripten). Fixes emscripten-core#26090
612953a to
45ba451
Compare
sbc100
approved these changes
Feb 3, 2026
inolen
pushed a commit
to inolen/emscripten
that referenced
this pull request
Feb 13, 2026
The test was failing intermittently on Linux because inode numbers were stored in signed 32-bit integers. On modern Linux filesystems, inode numbers frequently exceed the range of a signed 32-bit integer, leading to narrowing overflows and negative values which triggered assertion failures. This change updates the test to use ino_t (which is 64-bit in Emscripten). Fixes emscripten-core#26090
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test was failing intermittently on Linux because inode numbers were stored in signed 32-bit integers. On modern Linux filesystems, inode numbers frequently exceed the range of a signed 32-bit integer, leading to narrowing overflows and negative values which triggered assertion failures.
This change updates the test to use ino_t (which is 64-bit in Emscripten).
Fixes #26090