-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
fs: make ReadStream throw TypeError on NaN #19775
Conversation
Make ReadStream (and thus createReadStream) throw a TypeError signalling towards an invalid argument type when either options.start or options.end (or obviously, both) are set to NaN. Also add regression tests for the same. Fixes: nodejs#19715
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.
Thank you for bearing with us :)
The failure seems unrelated. |
@addaleax is this a flaky test? I think it seems completely unrelated. |
@ryzokuken yes it is unrelated. |
@lpinca if that's the case, please land this whenever you deem fit. Thanks. |
LGTM. Thank you for being patient. Good bug fix. |
shows that build was successful. Why does GitHub still show it as "pending" though? |
Can we land this now? |
@ryzokuken We have a policy that we typically wait 48 hours for PRs to land, and 72 hours over weekends, so that everybody who wants to has a chance to look at it. |
Oh, sorry. I already know about the policy. I thought that because this is just a continuation of #19732, it didn't need to be up for 48 hours by itself. Cool, let's wait for a day or two then. |
@ryzokuken I don’t think we need to hurry on this Also, this is adding an error throw with the intention of landing it on LTS releases, which is something that people might feel uncomfortable with (I don’t in this case) |
@addaleax I understand. Thanks for being patient with me 😅 |
Re-running sole CI failed task node-test-commit-plinux: https://ci.nodejs.org/job/node-test-commit-plinux/16650/ |
Landed in 38a6929. |
Make ReadStream (and thus createReadStream) throw a TypeError signalling towards an invalid argument type when either options.start or options.end (or obviously, both) are set to NaN. Also add regression tests for the same. PR-URL: #19775 Fixes: #19715 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Make ReadStream (and thus createReadStream) throw a TypeError signalling towards an invalid argument type when either options.start or options.end (or obviously, both) are set to NaN. Also add regression tests for the same. PR-URL: nodejs#19775 Fixes: nodejs#19715 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Make ReadStream (and thus createReadStream) throw a TypeError signalling
towards an invalid argument type when either options.start or
options.end (or obviously, both) are set to NaN.
Also add regression tests for the same.
Fixes: #19715
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes/cc @lpinca @BridgeAR @addaleax @anliting