Skip to content

Fix uninitialized variable in mca_coll_base_alltoallv_intra_basic_inplace: Coverity CID 1498685 #11150

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

Merged
merged 1 commit into from
Dec 6, 2022
Merged

Fix uninitialized variable in mca_coll_base_alltoallv_intra_basic_inplace: Coverity CID 1498685 #11150

merged 1 commit into from
Dec 6, 2022

Conversation

drwootton
Copy link

A Coverity static analysis scan reported an uninitialized variable line in mca_coll_base_alltoallv_intra_basic_inplace.

This variable was intended to be set to the line number of a failing function call so that line number could be reported in an error message.

The fix sets line before branching to the exit point for each failing function call. Since line numbers may shift over time, I also added the function name to the error message.

Signed-off-by: David Wootton dwootton@us.ibm.com

@drwootton drwootton self-assigned this Dec 5, 2022
@drwootton drwootton changed the title Fix uninitialize variable in mca_coll_base_alltoallv_intra_basic_inplace: Coverity CID 1498685 Fix uninitialized variable in mca_coll_base_alltoallv_intra_basic_inplace: Coverity CID 1498685 Dec 5, 2022
@drwootton
Copy link
Author

Wait a bit before reviewing. I'm going thru a list of Coverity reports sequentially and just noticed the same problem with coll_base_alltoall.c so will fix this in this pull request as well.

@drwootton
Copy link
Author

coll_base_alltoall.c updated too, so now ready for review

@drwootton drwootton requested review from bosilca December 5, 2022 18:37
@bosilca
Copy link
Member

bosilca commented Dec 5, 2022

This error message is mostly for collective developers. Thus, knowing the source file and line number seem to be redundant with the newly added function that fails.

…all.

Coverity CID 1498685

Fix review comment.

Signed-off-by: David Wootton <dwootton@us.ibm.com>
@drwootton
Copy link
Author

Removed function name from message.

@jjhursey
Copy link
Member

jjhursey commented Dec 6, 2022

bot:aws:retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants