Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d0a5bd676fe77d745addf99187041cf899603ca5
Choose a base ref
...
head repository: nodejs/node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 09ecd2e84a2d7f507d26742912d729d5dc5c81f0
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 12, 2025

  1. fs: add missing call to uv_fs_req_cleanup

    Always call uv_fs_req_cleanup after calling uv_fs_open instead of just
    when uv_fs_open returns a negative result. I referenced ReadFileSync
    from node:js2c when making this change.
    
    https://github.com/bnoordhuis made the same suggestion based on the
    PR #49691.
    
    Fixes: #57800
    PR-URL: #57811
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Justin-Nietzel authored and jasnell committed Apr 12, 2025
    Configuration menu
    Copy the full SHA
    6a7b005 View commit details
    Browse the repository at this point in the history
  2. fs: added test for missing call to uv_fs_req_cleanup

    Added a unit test for testing the memory usage of readFileSync.
    Test is looking specifically for the the issue caused by failing
    to free the filepath buffer in fs::ReadFileUtf8(), but it will also
    catch other significant memory leaks in readFileSync() as well.
    
    Refs: #57800
    PR-URL: #57811
    Fixes: #57800
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Justin-Nietzel authored and jasnell committed Apr 12, 2025
    Configuration menu
    Copy the full SHA
    09ecd2e View commit details
    Browse the repository at this point in the history
Loading