Uh oh!
There was an error while loading. Please reload this page.
wasi: address coverity warning - #49866
Closed
mhdawson wants to merge 1 commit into
Closed
Conversation
mhdawson
commented
Sep 25, 2023
Member
- 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 wasi: throw on failed uvwasi_init() #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.
- 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 <midawson@redhat.com>
nodejs-github-bot
commented
Sep 25, 2023
Collaborator
Review requested:
|
mhdawson
commented
Sep 25, 2023
MemberAuthor
Coverity warning: 84if (err != UVWASI_ESUCCESS) {
85 Local<Value> exception;
2. Condition !v8::MaybeLocal<v8::Value>(node::wasi::WASIException(env->context(), err, "uvwasi_init")).ToLocal(&exception), taking true branch.
86if (!WASIException(env->context(), err, "uvwasi_init").ToLocal(&exception))
4. uninit_member: Non-staticclassmember uvw_.fds is not initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-staticclassmember uvw_.argc is not initialized in this constructor nor in any functions that it calls.
8. uninit_member: Non-staticclassmember uvw_.argv is not initialized in this constructor nor in any functions that it calls.
10. uninit_member: Non-staticclassmember uvw_.argv_buf is not initialized in this constructor nor in any functions that it calls.
12. uninit_member: Non-staticclassmember uvw_.argv_buf_size is not initialized in this constructor nor in any functions that it calls.
14. uninit_member: Non-staticclassmember uvw_.envc is not initialized in this constructor nor in any functions that it calls.
16. uninit_member: Non-staticclassmember uvw_.env is not initialized in this constructor nor in any functions that it calls.
18. uninit_member: Non-staticclassmember uvw_.env_buf is not initialized in this constructor nor in any functions that it calls.
20. uninit_member: Non-staticclassmember uvw_.env_buf_size is not initialized in this constructor nor in any functions that it calls.
CID276376 (#2 of 2): Uninitialized pointer field (UNINIT_CTOR)
22. uninit_member: Non-staticclassmember uvw_.allocator is not initialized in this constructor nor in any functions that it calls.
87return;
8889 env->isolate()->ThrowException(exception); |
nodejs-github-bot
commented
Sep 28, 2023
Collaborator
cjihrig
approved these changes
Sep 28, 2023
nodejs-github-bot
commented
Sep 29, 2023
Collaborator
devsnek
commented
Sep 29, 2023
Member
is this condition reachable when the isolate is terminated? |
This was referenced Sep 30, 2023
mhdawson
commented
Oct 4, 2023
MemberAuthor
Since there is a return code from the function around which the CHECK as been added I believe it should be reachable. |
mhdawson added a commit
that referenced
this pull request
Oct 12, 2023
- 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 <midawson@redhat.com> PR-URL: #49866 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
mhdawson
commented
Oct 12, 2023
MemberAuthor
Landed in c1a3a98 |
targos pushed a commit
that referenced
this pull request
Nov 11, 2023
- 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 <midawson@redhat.com> PR-URL: #49866 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.