-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
[v8.x] src: fix fs.write() externalized string handling #22731
Conversation
@addaleax should this be included in the 8.12.0 release or is it ok to wait until 8.12.1? |
@MylesBorins It’s hard to tell – I’d be in favour of including it. It’s been in @jasnell The tests added here do check the broken code path in |
As long as there is appropriate coverage for this particular piece then it should be fine. |
Resume build: https://ci.nodejs.org/job/node-test-pull-request/17206/ |
This PR seems to be making windows completely fail, any idea what's up? |
It's some sort of compilation failure, e.g. https://ci.nodejs.org/job/node-compile-windows/21107/label=win-vs2015/console
|
src\string_bytes.cc(341): Among the search results for |
@addaleax are you able to take a look? Thanks |
Build with `-DNOMINMAX` to stop `<windows.h>` from defining macros that conflict with `std::min()` and `std::max()`. PR-URL: nodejs#18216 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* Respect `encoding` argument when the string is externalized. * Copy the string when the write request can outlive the externalized string. This commit removes `StringBytes::GetExternalParts()` because it is fundamentally broken. Fixes: nodejs#18146 Fixes: nodejs#22728 PR-URL: nodejs#18216
ed7b009
to
590aa1f
Compare
@BethGriggs Thanks for the ping! |
Build with `-DNOMINMAX` to stop `<windows.h>` from defining macros that conflict with `std::min()` and `std::max()`. Backport-PR-URL: #22731 PR-URL: #18216 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> PR-URL: #22731
* Respect `encoding` argument when the string is externalized. * Copy the string when the write request can outlive the externalized string. This commit removes `StringBytes::GetExternalParts()` because it is fundamentally broken. Fixes: #18146 Fixes: #22728 Backport-PR-URL: #22731 PR-URL: #18216 Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in |
Backport #18216
The merge conflicts in
node_file.cc
were non-trivial, so the changes there deserve to be treated like original content during review.