Skip to content

Conversation

@targos
Copy link
Member

String::NewFromUtf8 doesn't generate an exception in V8 when the string
is too long but is guaranteed to return an empty MaybeLocal only in
that case. Generate a Node.js exception when it happens.

Fixes: #35676

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

String::NewFromUtf8 doesn't generate an exception in V8 when the string is too long but is guaranteed to return an empty MaybeLocal only in that case. Generate a Node.js exception when it happens. Fixes: nodejs#35676
@targostargos added the string_decoder Issues and PRs related to the string_decoder subsystem. label Dec 28, 2020
@targostargos requested a review from addaleaxDecember 28, 2020 13:19
@nodejs-github-botnodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. labels Dec 28, 2020
@targostargos added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 28, 2020
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 28, 2020
@nodejs-github-bot
Copy link
Collaborator

@targostargos added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 30, 2020
@jasnelljasnell added the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 31, 2020
@github-actionsgithub-actionsbot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 31, 2020
@github-actions
Copy link
Contributor

Landed in c380ee6...11b34a9

nodejs-github-bot pushed a commit that referenced this pull request Dec 31, 2020
String::NewFromUtf8 doesn't generate an exception in V8 when the string is too long but is guaranteed to return an empty MaybeLocal only in that case. Generate a Node.js exception when it happens. Fixes: #35676 PR-URL: #36661 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 12, 2021
String::NewFromUtf8 doesn't generate an exception in V8 when the string is too long but is guaranteed to return an empty MaybeLocal only in that case. Generate a Node.js exception when it happens. Fixes: #35676 PR-URL: #36661 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@danielleadamsdanielleadams mentioned this pull request Jan 12, 2021
@targostargos deleted the fix-35676 branch April 12, 2021 15:06
targos added a commit that referenced this pull request May 25, 2021
String::NewFromUtf8 doesn't generate an exception in V8 when the string is too long but is guaranteed to return an empty MaybeLocal only in that case. Generate a Node.js exception when it happens. Fixes: #35676 PR-URL: #36661 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
targos added a commit that referenced this pull request Jun 5, 2021
String::NewFromUtf8 doesn't generate an exception in V8 when the string is too long but is guaranteed to return an empty MaybeLocal only in that case. Generate a Node.js exception when it happens. Fixes: #35676 PR-URL: #36661 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@targostargos mentioned this pull request Jun 6, 2021
targos added a commit that referenced this pull request Jun 11, 2021
String::NewFromUtf8 doesn't generate an exception in V8 when the string is too long but is guaranteed to return an empty MaybeLocal only in that case. Generate a Node.js exception when it happens. Fixes: #35676 PR-URL: #36661 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.bufferIssues and PRs related to the buffer subsystem.c++Issues and PRs that require attention from people who are familiar with C++.string_decoderIssues and PRs related to the string_decoder subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StringDecoder undocumented size limit

7 participants

@targos@nodejs-github-bot@jasnell@Trott@addaleax@cjihrig@gireeshpunathil