Repository navigation
UCP/UCT/TEST/EXAMPLES: Fix several coverity issues. - #6094
Conversation
bc5a70f to
d45a32e
Compare
|
@yosefe please review |
| if (err_handling_opt.failure_mode == FAILURE_MODE_SEND) { | ||
| fprintf(stderr, "Emulating unexpected failure on server side, client " | ||
| "should detect error by keepalive mechanism\n"); | ||
| free(msg); |
There was a problem hiding this comment.
can we add exit() after raise() instead, since exit() has noreturn attribute
There was a problem hiding this comment.
with exit(1) to indicate an error happened?
| if (status != UCS_OK) { | ||
| ucs_warn("failed to reject connect request %p on listener %p", | ||
| conn_request, listener); | ||
| ucs_warn("failed to reject connect request on listener %p", listener); |
There was a problem hiding this comment.
can we add Coverity exception here? since ucs_warn does really not dereference the pointer, just prints it
There was a problem hiding this comment.
you mean to add a comment to make coverity ignore this?
test_sockaddr.cc - NEGATIVE_RETURNS - "index" is passed to a parameter
that cannot be negative. [Note: The source code implementation of the
function has been overridden by a builtin model.]
uct_cm.c - PRINTF_ARGS - Argument "self->iface" to format specifier "%p"
was expected to have pointer type but has type "struct uct_base_iface".
ucp_hello_world.c - USE_AFTER_FREE - Dereferencing freed pointer "msg"
wireup_cm.c - USE_AFTER_FREE - Passing freed pointer "conn_request" as
an argument to "ucs_log_dispatch" ("uct_listener_reject" frees
"conn_request".).
d45a32e to
a245659
Compare
|
|
||
| index = get_ep_index(ep); | ||
| ASSERT_GE(index, 0); | ||
| ASSERT_TRUE(index >= 0); |
There was a problem hiding this comment.
do you see this warning since different signedness?
but if I'm not mistaken, they both have to be signed integer
There was a problem hiding this comment.
later on in this function index is used to access a field in an array, so therefore it can't be a negative value.
|
@yosefe can you have another look please? |
No description provided.