GeezerVison is showing github.com — fs: harden the one-round-trip read and write jobs by 3zrv · Pull Request #67112 · nodejs/node
Conversation
3zrv
commented
Oct 29, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Follow-up to fs: read small files in one thread pool round trip.
ReadFileJob and WriteFileJob now run the permission check on the path stored at construction, not the value passed to run(), so the check cannot differ from the path the thread pool opens. run() nolonger takes an argument.
ReadFileJob grew the native buffer of a size-0 file (/dev/zero, pipes, procfs) until EOF or OOM. It now stops at 2 GiB (kIoMaxLength) and hands the fd back with a size over the limit, so both callers reject with ERR_FS_FILE_TOO_LARGE and close it, as for a regular file of that size. The previous chunked reader was equally unbounded, so this is hardening, not a regression fix.
Tests: test-permission-fs-one-round-trip-path.js. The cap has no test because it would have to read 2 GiB.
Disclosure: this PR was assisted by Sonnet 5.5.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
added
c++
Issues and PRs that require attention from people who are familiar with C++.
fs
Issues and PRs related to file-system APIs and the fs module.
needs-ci
PRs that need a full CI run.
labels
Oct 29, 2026
codecov
Bot
commented
Oct 29, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
❌ Patch coverage is 46.66667% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.68%. Comparing base (5f602d5) to head (0f6326d).
Additional details and impacted files
@@ Coverage Diff @@
## main #67112 +/- ##
==========================================
- Coverage 90.68% 90.68% -0.01%
==========================================
Files 797 797
Lines 279574 279575 +1
Branches 53778 53775 -3
==========================================
Hits 253525 253525
- Misses 16344 16347 +3
+ Partials 9705 9703 -2
... and 28 files with indirect coverage changes
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
mcollina
mcollina approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
c++
Issues and PRs that require attention from people who are familiar with C++.
fs
Issues and PRs related to file-system APIs and the fs module.
needs-ci
PRs that need a full CI run.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.