Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
wasi: throw on failed uvwasi_init()#31076
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
cjihrig commented Dec 24, 2019 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
cjihrig commented Dec 24, 2019
@addaleax I think I've addressed all of your comments. |
nodejs-github-bot commented Dec 24, 2019
nodejs-github-bot commented Dec 25, 2019
nodejs-github-bot commented Dec 25, 2019 • edited by cjihrig
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by cjihrig
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Dec 25, 2019
Original commit message: This commit ensures that multiple calls to uvwasi_destroy() are possible. Prior to this commit, subsequent calls to destroy() would abort because the file table's rwlock was incorrectly being destroyed multiple times. PR-URL: nodejs#31076 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Original commit message: This commit changes the memory management in uvwasi_fd_table_init() such that ENOMEM errors can be handled better in uvwasi_fd_table_free(). PR-URL: nodejs#31076 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Prior to this commit, if uvwasi_init() failed in any way, Node would abort due to a failed CHECK_EQ(). This commit changes that behavior to a thrown exception. PR-URL: nodejs#31076Fixes: nodejs#30878 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
cjihrig commented Dec 26, 2019
Landed in 3d50001...208453e. Thanks for the reviews. |
Original commit message: This commit ensures that multiple calls to uvwasi_destroy() are possible. Prior to this commit, subsequent calls to destroy() would abort because the file table's rwlock was incorrectly being destroyed multiple times. PR-URL: #31076 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Original commit message: This commit changes the memory management in uvwasi_fd_table_init() such that ENOMEM errors can be handled better in uvwasi_fd_table_free(). PR-URL: #31076 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Prior to this commit, if uvwasi_init() failed in any way, Node would abort due to a failed CHECK_EQ(). This commit changes that behavior to a thrown exception. PR-URL: #31076Fixes: #30878 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Original commit message: This commit ensures that multiple calls to uvwasi_destroy() are possible. Prior to this commit, subsequent calls to destroy() would abort because the file table's rwlock was incorrectly being destroyed multiple times. PR-URL: #31076 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Original commit message: This commit changes the memory management in uvwasi_fd_table_init() such that ENOMEM errors can be handled better in uvwasi_fd_table_free(). PR-URL: #31076 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Prior to this commit, if uvwasi_init() failed in any way, Node would abort due to a failed CHECK_EQ(). This commit changes that behavior to a thrown exception. PR-URL: #31076Fixes: #30878 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Original commit message: This commit ensures that multiple calls to uvwasi_destroy() are possible. Prior to this commit, subsequent calls to destroy() would abort because the file table's rwlock was incorrectly being destroyed multiple times. PR-URL: #31076 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Original commit message: This commit changes the memory management in uvwasi_fd_table_init() such that ENOMEM errors can be handled better in uvwasi_fd_table_free(). PR-URL: #31076 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Prior to this commit, if uvwasi_init() failed in any way, Node would abort due to a failed CHECK_EQ(). This commit changes that behavior to a thrown exception. PR-URL: #31076Fixes: #30878 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Original commit message: This commit ensures that multiple calls to uvwasi_destroy() are possible. Prior to this commit, subsequent calls to destroy() would abort because the file table's rwlock was incorrectly being destroyed multiple times. PR-URL: #31076 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Original commit message: This commit changes the memory management in uvwasi_fd_table_init() such that ENOMEM errors can be handled better in uvwasi_fd_table_free(). PR-URL: #31076 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Prior to this commit, if uvwasi_init() failed in any way, Node would abort due to a failed CHECK_EQ(). This commit changes that behavior to a thrown exception. PR-URL: #31076Fixes: #30878 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Rich Trott <[email protected]>
- add check for case when trying to provide a better Exception fails - the code was modified to avoid a CHECK_EQ in all cases in nodejs#31076, however, I believe that if we fail to create the exeption to throw instead of simply returning using a CHECK makes more sense. I think it should also address the coverity warning about not initializing in the constructor. Signed-off-by: Michael Dawson <[email protected]>
- add check for case when trying to provide a better Exception fails - the code was modified to avoid a CHECK_EQ in all cases in #31076, however, I believe that if we fail to create the exeption to throw instead of simply returning using a CHECK makes more sense. I think it should also address the coverity warning about not initializing in the constructor. Signed-off-by: Michael Dawson <[email protected]> PR-URL: #49866 Reviewed-By: Colin Ihrig <[email protected]>
- add check for case when trying to provide a better Exception fails - the code was modified to avoid a CHECK_EQ in all cases in nodejs#31076, however, I believe that if we fail to create the exeption to throw instead of simply returning using a CHECK makes more sense. I think it should also address the coverity warning about not initializing in the constructor. Signed-off-by: Michael Dawson <[email protected]> PR-URL: nodejs#49866 Reviewed-By: Colin Ihrig <[email protected]>
- add check for case when trying to provide a better Exception fails - the code was modified to avoid a CHECK_EQ in all cases in #31076, however, I believe that if we fail to create the exeption to throw instead of simply returning using a CHECK makes more sense. I think it should also address the coverity warning about not initializing in the constructor. Signed-off-by: Michael Dawson <[email protected]> PR-URL: #49866 Reviewed-By: Colin Ihrig <[email protected]>
Prior to this commit, if
uvwasi_init()failed in any way, Node would abort due to a failedCHECK_EQ(). This commit changes that behavior to a thrown exception.Fixes: #30878
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes