Skip to content

ofi: Fix Coverity warnings #11659

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
May 23, 2023
Merged

ofi: Fix Coverity warnings #11659

merged 1 commit into from
May 23, 2023

Conversation

amirshehataornl
Copy link
Contributor

@amirshehataornl amirshehataornl commented May 9, 2023

Fix two coverity warnings:

  • Uninitialized variables (UNINIT) in /opal/mca/common/ofi/common_ofi.c: 859 in opal_common_ofi_select_provider()
  • Null pointer dereferences (FORWARD_NULL) /opal/mca/common/ofi/common_ofi.c: 636 in is_near()

Fixes #11657

@gpaulsen
Copy link
Member

gpaulsen commented May 9, 2023

Thanks for the fixes.

@jsquyres
Copy link
Member

jsquyres commented May 9, 2023

There are now competing fixes for #11657. Please coordinate with #11660 and #11653 to figure out which ones should be merged.

@wenduwan
Copy link
Contributor

wenduwan commented May 9, 2023

@amirshehataornl ooops we are trying to fix the same things lol.

I will trust your judgement here and hold back my changes.

@jsquyres
Copy link
Member

@amirshehataornl There's now conflicts with this PR, preventing it from being merged. Can you fix?

Fix two coverity warnings:
  - Uninitialized variables (UNINIT) in /opal/mca/common/ofi/common_ofi.c: 859 in opal_common_ofi_select_provider()
  - Null pointer dereferences (FORWARD_NULL) /opal/mca/common/ofi/common_ofi.c: 636 in is_near()

Move the "near" parameter in opal_common_ofi_select_provider() outside
the #if OPAL_OFI_PCI_DATA_AVAILABLE block, because later in the code
it's being used outside of it.

Signed-off-by: Amir Shehata <shehataa@ornl.gov>
@janjust
Copy link
Contributor

janjust commented May 23, 2023

@amirshehataornl please open up v5.0 PR

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.

Coverity static analysis errors from "ofi: NIC selection update" commit
6 participants