-
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
buffer,doc: Throw error instead of assert when buffer too large #40243
Closed
rayw000
wants to merge
2
commits into
nodejs:master
from
rayw000:throw-error-instead-of-assert-when-buffer-too-large
Closed
buffer,doc: Throw error instead of assert when buffer too large #40243
rayw000
wants to merge
2
commits into
nodejs:master
from
rayw000:throw-error-instead-of-assert-when-buffer-too-large
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Sep 28, 2021
rayw000
changed the title
Throw error instead of assert when buffer too large
buffer+doc: Throw error instead of assert when buffer too large
Sep 29, 2021
rayw000
changed the title
buffer+doc: Throw error instead of assert when buffer too large
buffer,doc: Throw error instead of assert when buffer too large
Sep 29, 2021
jasnell
approved these changes
Sep 30, 2021
tniessen
reviewed
Oct 4, 2021
Mesteery
added
request-ci
Add this label to start a Jenkins CI on a PR.
and removed
needs-ci
PRs that need a full CI run.
labels
Oct 12, 2021
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Oct 12, 2021
Mesteery
added
aix
Issues and PRs related to the AIX platform.
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
and removed
aix
Issues and PRs related to the AIX platform.
labels
Oct 13, 2021
Hi @Mesteery I'm not sure that I fully understand the error report CI gives. Some of them are |
I think these are flaky tests, they are not related to this PR. |
22 tasks
This was referenced Oct 15, 2021
targos
approved these changes
Oct 23, 2021
Landed in c83f47f...14f6c67 |
rayw000
deleted the
throw-error-instead-of-assert-when-buffer-too-large
branch
October 23, 2021 07:19
kvakil
added a commit
to kvakil/node
that referenced
this pull request
Jul 22, 2022
A recent pull request changed this method to throw when the buffer was too big, but this meant that the `free` finalizer would never get called, leading to a memory leak. Included is a test which provokes this behavior using `v8.serialize`. Technically the behavior is allocator-dependent, but I suspect any reasonable allocator will choose to free (or at the very least, reuse) the 1 GiB memory. Refs: nodejs#40243
kvakil
added a commit
to kvakil/node
that referenced
this pull request
Jul 22, 2022
A recent pull request changed this method to throw when the buffer was too big, but this meant that the `free` finalizer would never get called, leading to a memory leak. Included is a test which provokes this behavior using `v8.serialize`. Technically the behavior is allocator-dependent, but I suspect any reasonable allocator will choose to free (or at the very least, reuse) the 1 GiB memory. Refs: nodejs#40243
kvakil
added a commit
to kvakil/node
that referenced
this pull request
Jul 23, 2022
A recent pull request changed this method to throw when the buffer was too big, but this meant that the `free` finalizer would never get called, leading to a memory leak. A previous version of this diff included a test provoking this behavior with `v8.serialize`, but it unfortunately kept triggering the OOM killer, so it was removed. Refs: nodejs#40243
nodejs-github-bot
pushed a commit
that referenced
this pull request
Jul 24, 2022
A recent pull request changed this method to throw when the buffer was too big, but this meant that the `free` finalizer would never get called, leading to a memory leak. A previous version of this diff included a test provoking this behavior with `v8.serialize`, but it unfortunately kept triggering the OOM killer, so it was removed. Refs: #40243 PR-URL: #43938 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
danielleadams
pushed a commit
that referenced
this pull request
Jul 26, 2022
A recent pull request changed this method to throw when the buffer was too big, but this meant that the `free` finalizer would never get called, leading to a memory leak. A previous version of this diff included a test provoking this behavior with `v8.serialize`, but it unfortunately kept triggering the OOM killer, so it was removed. Refs: #40243 PR-URL: #43938 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
targos
pushed a commit
that referenced
this pull request
Jul 31, 2022
A recent pull request changed this method to throw when the buffer was too big, but this meant that the `free` finalizer would never get called, leading to a memory leak. A previous version of this diff included a test provoking this behavior with `v8.serialize`, but it unfortunately kept triggering the OOM killer, so it was removed. Refs: #40243 PR-URL: #43938 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
targos
pushed a commit
that referenced
this pull request
Jul 31, 2022
A recent pull request changed this method to throw when the buffer was too big, but this meant that the `free` finalizer would never get called, leading to a memory leak. A previous version of this diff included a test provoking this behavior with `v8.serialize`, but it unfortunately kept triggering the OOM killer, so it was removed. Refs: #40243 PR-URL: #43938 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
targos
pushed a commit
that referenced
this pull request
Aug 1, 2022
A recent pull request changed this method to throw when the buffer was too big, but this meant that the `free` finalizer would never get called, leading to a memory leak. A previous version of this diff included a test provoking this behavior with `v8.serialize`, but it unfortunately kept triggering the OOM killer, so it was removed. Refs: #40243 PR-URL: #43938 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Fyko
pushed a commit
to Fyko/node
that referenced
this pull request
Sep 15, 2022
A recent pull request changed this method to throw when the buffer was too big, but this meant that the `free` finalizer would never get called, leading to a memory leak. A previous version of this diff included a test provoking this behavior with `v8.serialize`, but it unfortunately kept triggering the OOM killer, so it was removed. Refs: nodejs#40243 PR-URL: nodejs#43938 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
guangwong
pushed a commit
to noslate-project/node
that referenced
this pull request
Oct 10, 2022
A recent pull request changed this method to throw when the buffer was too big, but this meant that the `free` finalizer would never get called, leading to a memory leak. A previous version of this diff included a test provoking this behavior with `v8.serialize`, but it unfortunately kept triggering the OOM killer, so it was removed. Refs: nodejs/node#40243 PR-URL: nodejs/node#43938 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
buffer
Issues and PRs related to the buffer subsystem.
c++
Issues and PRs that require attention from people who are familiar with C++.
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.
What changed
const buffer = v8.serialize(<huge object>)
. In this case, an exception would be better than assertion.Additional: https://chromium-review.googlesource.com/c/v8/v8/+/3170411
Maybe fix: #40059