| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
Sorry, something went wrong.
|
This has been open for more than a week with no comments... ping @nodejs/crypto. |
Sorry, something went wrong.
|
Do we have a team to ping for C++ reviews? |
Sorry, something went wrong.
I don't think we do. I suggested this in #43286 (comment) (but I guess a fast-tracked PR wasn't a good place to mention it). Edit: opened nodejs/TSC#1237. Second edit: created @nodejs/cpp-reviewers. |
Sorry, something went wrong.
|
This has been open for more than two weeks with no comments... ping @nodejs/cpp-reviewers @nodejs/crypto. |
Sorry, something went wrong.
Commit Queue failed- Loading data for nodejs/node/pull/43202 ✔ Done loading data for nodejs/node/pull/43202 ----------------------------------- PR info ------------------------------------ Title src: fix memory leaks and refactor ByteSource (#43202) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch tniessen:src-memory-leaks-and-refactor-bytesource -> nodejs:master Labels crypto, c++, lib / src, author ready, needs-ci Commits 1 - src: fix memory leaks and refactor ByteSource Committers 1 - Tobias Nießen PR-URL: https://github.com/nodejs/node/pull/43202 Reviewed-By: Anna Henningsen Reviewed-By: Darshan Sen Reviewed-By: James M Snell ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/43202 Reviewed-By: Anna Henningsen Reviewed-By: Darshan Sen Reviewed-By: James M Snell -------------------------------------------------------------------------------- ℹ This PR was created on Tue, 24 May 2022 23:01:55 GMT ✔ Approvals: 3 ✔ - Anna Henningsen (@addaleax): https://github.com/nodejs/node/pull/43202#pullrequestreview-1002220635 ✔ - Darshan Sen (@RaisinTen) (TSC): https://github.com/nodejs/node/pull/43202#pullrequestreview-1002898142 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/43202#pullrequestreview-1003512265 ✖ Last GitHub CI failed ℹ Last Full PR CI on 2022-06-12T05:35:56Z: https://ci.nodejs.org/job/node-test-pull-request/44453/ - Querying data for job/node-test-pull-request/44453/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/2483034882 |
Sorry, something went wrong.
Add ByteSource::Builder to replace the common MallocOpenSSL() + ByteSource::Allocated() pattern. Remove ByteSource::reset() that is unused. Remove ByteSource::Resize() to make ByteSource truly immutable (until moved away). Instead, ByteSource::Builder::release() takes an optional size argument that truncates the resulting ByteSource. Fix occurrences of MallocOpenSSL() that do not always free the allocated memory by using the new ByteSource::Builder class instead. Remove ByteSource::get() and replace uses with ByteSource::data(). Remove ReallocOpenSSL() because it likely only saves us a few bytes whenever we use it. PR-URL: #43202 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Avoid manual calls to MallocOpenSSL in ArrayBufferOrViewContents and use the new ByteSource::Builder instead. Refs: nodejs#43202
|
This would need a backport to land on v16.x because std::optional and std::nullopt are not available on that branch. |
Sorry, something went wrong.
ByteSource::Allocated accepts a void pointer now, so we do not need to cast the argument to a char pointer. Refs: nodejs#43202
| Back | FazBrowse Home | New Git URL |
Add ByteSource::Builder to replace the common MallocOpenSSL() + ByteSource::Allocated() pattern.
Remove ByteSource::reset() that is unused.
Remove ByteSource::Resize() to make ByteSource truly immutable (until moved away). Instead, ByteSource::Builder::release() takes an optional size argument that truncates the resulting ByteSource.
Fix occurrences of MallocOpenSSL() that do not always free the allocated memory by using the new ByteSource::Builder class instead.
Remove ByteSource::get() and replace uses with ByteSource::data().
Remove ReallocOpenSSL() because it likely only saves us a few bytes whenever we use it.
This does save a few dozen lines of code, too. (Much of the diff is just to make the linter happy, which apparently requires changed lines to be formatted, and that increases the diff by about 50 % in this case.)