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: c692568a092312e161a6926f8daf52f9fa4f2b78
Choose a base ref
...
head repository: nodejs/node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 96058f33a9c72796930a77c97018fda2cbb5ed03
Choose a head ref
  • 5 commits
  • 13 files changed
  • 1 contributor

Commits on Jan 23, 2020

  1. deps: update to uvwasi 0.0.5

    This version improves file descriptor renumbering, and as a result
    fixes uvwasi_fd_renumber().
    
    PR-URL: #31432
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: David Carlier <devnexen@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
    cjihrig authored and Trott committed Jan 23, 2020
    Configuration menu
    Copy the full SHA
    8b606d3 View commit details
    Browse the repository at this point in the history
  2. deps: uvwasi: cherry-pick ea73af5

    Original commit message:
    
        unlock all fd mutexes in reverse order
    
        Some functions acquire mutexes for multiple file descriptors.
        This commit ensures that the mutexes are released in the
        reverse order that they are aquired.
    
    PR-URL: #31432
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: David Carlier <devnexen@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
    cjihrig authored and Trott committed Jan 23, 2020
    Configuration menu
    Copy the full SHA
    28bee24 View commit details
    Browse the repository at this point in the history
  3. deps: uvwasi: cherry-pick c3bef8e

    Original commit message:
        prevent locking fd table while holding a mutex
    
        uvwasi_path_rename(), uvwasi_path_link(),
        uvwasi_path_open(), and uvwasi_fd_renumber() operate
        on multiple file descriptors. uvwasi_fd_renumber() has
        been updated prior to this commit, and is not relevant
        here. The other three functions would perform the
        following locking operations:
    
        - lock the file table
        - acquire a file descriptor mutex
        - unlock the file table
        - unlock the file table again
        - acquire another file descriptor mutex
        - unlock the file table
        - unlock the two mutexes
    
        Attempting to acquire the second mutex introduced
        the possibility of deadlock because another thread
        could attempt to acquire the first mutex while
        holding the file table lock.
    
        This commit ensures that multiple mutexes are either:
        - acquired in a single lock of the file table
        - or, only acquired after releasing previously held mutexes
    
        Fixes: nodejs/uvwasi#89
    
    PR-URL: #31432
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: David Carlier <devnexen@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
    cjihrig authored and Trott committed Jan 23, 2020
    Configuration menu
    Copy the full SHA
    c150f9d View commit details
    Browse the repository at this point in the history
  4. deps: uvwasi: cherry-pick eea4508

    Original commit message:
    
        prevent race conditions with uvwasi_fd_close()
    
        uvwasi_fd_close() performed the following operations:
    
        - lock the file descriptor mutex
        - close the file
        - release the file descriptor mutex
        - call the file table's remove() function
    
        Once the fd's mutex is released, another thread could
        acquire it before the fd is removed from the file
        table. If this happens, remove() could destroy a held
        mutex.
    
        This commit updates uvwasi_fd_close() to perform the
        entire sequence while holding the file table's lock,
        preventing new acquisitions of the fd's mutex.
    
        Fixes: nodejs/uvwasi#88
    
    PR-URL: #31432
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: David Carlier <devnexen@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
    cjihrig authored and Trott committed Jan 23, 2020
    Configuration menu
    Copy the full SHA
    30173c6 View commit details
    Browse the repository at this point in the history
  5. test: add wasi test for freopen()

    This test provides missing coverage for __wasi_fd_renumber().
    
    PR-URL: #31432
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: David Carlier <devnexen@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
    cjihrig authored and Trott committed Jan 23, 2020
    Configuration menu
    Copy the full SHA
    96058f3 View commit details
    Browse the repository at this point in the history
Loading