GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — string_decoder: throw an error when writing a too long buffer by kylo5aby · Pull Request #52215 · nodejs/node

Conversation

@kylo5aby

@kylo5aby kylo5aby commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

Fixes: #52214

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot nodejs-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++. needs-ci PRs that need a full CI run. labels Mar 26, 2024
@mertcanaltin mertcanaltin added the string_decoder Issues and PRs related to the string_decoder subsystem. label Mar 26, 2024
addaleax
addaleax approved these changes Mar 26, 2024
View reviewed changes
theanarkh
theanarkh approved these changes Mar 26, 2024
View reviewed changes
Comment thread test/pummel/test-string-decoder-large-buffer.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

lpinca
lpinca approved these changes Mar 26, 2024
View reviewed changes
@theanarkh theanarkh added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Mar 27, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Mar 27, 2024
@nodejs-github-bot

nodejs-github-bot commented Mar 27, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/57966/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@theanarkh

theanarkh commented Mar 27, 2024

Copy link
Copy Markdown
Contributor

The test will fail on some platforms. It looks like 2**31 is too big.

13:29:07 not ok 947 pummel/test-string-decoder-large-buffer
13:29:07   ---
13:29:07   duration_ms: 231.98500
13:29:07   severity: fail
13:29:07   exitcode: 1
13:29:07   stack: |-
13:29:07     C:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-string-decoder-large-buffer.js:24
13:29:07         throw e;
13:29:07         ^
13:29:07     
13:29:07     RangeError [ERR_OUT_OF_RANGE]: The value of "size" is out of range. It must be >= 0 && <= 2147483647. Received 2147483648
13:29:07         at Function.alloc (node:buffer:389:3)
13:29:07         at Object.<anonymous> (C:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-string-decoder-large-buffer.js:18:22)
13:29:07         at Module._compile (node:internal/modules/cjs/loader:1421:14)
13:29:07         at Module._extensions..js (node:internal/modules/cjs/loader:1499:10)
13:29:07         at Module.load (node:internal/modules/cjs/loader:1232:32)
13:29:07         at Module._load (node:internal/modules/cjs/loader:1048:12)
13:29:07         at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:187:14)
13:29:07         at node:internal/main/run_main_module:28:49 {
13:29:07       code: 'ERR_OUT_OF_RANGE'
13:29:07     }
13:29:07     
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kylo5aby
kylo5aby force-pushed the string_decoder branch 3 times, most recently from f691105 to dbb31b1 Compare March 27, 2024 13:39
@kylo5aby

kylo5aby commented Mar 27, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

The test will fail on some platforms. It looks like 2**31 is too big.

13:29:07 not ok 947 pummel/test-string-decoder-large-buffer
13:29:07   ---
13:29:07   duration_ms: 231.98500
13:29:07   severity: fail
13:29:07   exitcode: 1
13:29:07   stack: |-
13:29:07     C:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-string-decoder-large-buffer.js:24
13:29:07         throw e;
13:29:07         ^
13:29:07     
13:29:07     RangeError [ERR_OUT_OF_RANGE]: The value of "size" is out of range. It must be >= 0 && <= 2147483647. Received 2147483648
13:29:07         at Function.alloc (node:buffer:389:3)
13:29:07         at Object.<anonymous> (C:\workspace\node-test-binary-windows-js-suites\node\test\pummel\test-string-decoder-large-buffer.js:18:22)
13:29:07         at Module._compile (node:internal/modules/cjs/loader:1421:14)
13:29:07         at Module._extensions..js (node:internal/modules/cjs/loader:1499:10)
13:29:07         at Module.load (node:internal/modules/cjs/loader:1232:32)
13:29:07         at Module._load (node:internal/modules/cjs/loader:1048:12)
13:29:07         at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:187:14)
13:29:07         at node:internal/main/run_main_module:28:49 {
13:29:07       code: 'ERR_OUT_OF_RANGE'
13:29:07     }
13:29:07     

I believe it's because of the buffer with size > INT32_MAX on x32 platform which will throw range error, I have updated and skip the test file on x32 platform

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kylo5aby

kylo5aby commented Apr 24, 2024

Copy link
Copy Markdown
Contributor Author

@theanarkh Could you pls retrigger CI?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@theanarkh theanarkh added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 24, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 24, 2024
@nodejs-github-bot

nodejs-github-bot commented Apr 24, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/58651/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kylo5aby
kylo5aby force-pushed the string_decoder branch from dbb31b1 to 3262b9b Compare April 24, 2024 05:58
@kylo5aby
string_decoder: throw an error when writing a too long buffer
8a75195
@kylo5aby
kylo5aby force-pushed the string_decoder branch from 3262b9b to 8a75195 Compare April 24, 2024 07:11
@theanarkh theanarkh added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 24, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 24, 2024
@nodejs-github-bot

nodejs-github-bot commented Apr 24, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/58673/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 25, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/58689/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Apr 27, 2024
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented Apr 27, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/58749/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented May 4, 2024 •
edited by jasnell
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/58916/ 💛

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell pushed a commit that referenced this pull request May 4, 2024
@kylo5aby @jasnell
string_decoder: throw an error when writing a too long buffer
8123be1
PR-URL: #52215
Fixes: #52214
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: theanarkh <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@jasnell

jasnell commented May 4, 2024

Copy link
Copy Markdown
Member

Landed in 8123be1

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell jasnell closed this May 4, 2024
targos pushed a commit that referenced this pull request May 8, 2024
@kylo5aby @targos
string_decoder: throw an error when writing a too long buffer
b0e6a6b
PR-URL: #52215
Fixes: #52214
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: theanarkh <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@targos targos mentioned this pull request May 13, 2024
v22.2.0 release proposal #52971
Merged
marco-ippolito pushed a commit that referenced this pull request Jun 17, 2024
@kylo5aby @marco-ippolito
string_decoder: throw an error when writing a too long buffer
a5f3dd1
PR-URL: #52215
Fixes: #52214
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: theanarkh <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@marco-ippolito marco-ippolito mentioned this pull request Jun 17, 2024
v20.15.0 proposal #53486
Merged
soophoo pushed a commit to soophoo/node that referenced this pull request Jun 20, 2024
@kylo5aby @soophoo
string_decoder: throw an error when writing a too long buffer
3b3676d
PR-URL: nodejs#52215
Fixes: nodejs#52214
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: theanarkh <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@addaleax addaleax addaleax approved these changes
@lpinca lpinca lpinca approved these changes
@theanarkh theanarkh theanarkh approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. string_decoder Issues and PRs related to the string_decoder subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

StringDecoder.write() doesn't report error when buffer length exceeds max integer value

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@kylo5aby @nodejs-github-bot @theanarkh @jasnell @addaleax @lpinca @mertcanaltin
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.