Skip to content
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

issue: HPCINFRA-1734 [CI] Coverity: upgrade to v2023.12 #176

Merged
merged 5 commits into from
Jul 10, 2024

Conversation

BasharRadya
Copy link
Collaborator

@BasharRadya BasharRadya commented Jul 3, 2024

Description

We're requested to upgrade the Coverity version to 2023.12

What

The PR runs Coverity v2023.12 against the Xlio codebase

Why ?

Justification for the PR. If there is existing issue/bug please reference.

How ?

It is optional but for complex PRs please provide information about the design,
architecture, approach, etc.

Change type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Check list

  • Code follows the style de facto guidelines of this project
  • Comments have been inserted in hard to understand places
  • Documentation has been updated (if necessary)
  • Test has been added (if possible)

@BasharRadya BasharRadya changed the base branch from master to vNext July 3, 2024 16:00
@BasharRadya BasharRadya added the enhancement New feature or request label Jul 3, 2024
@BasharRadya BasharRadya force-pushed the coverity branch 9 times, most recently from 00f64f2 to d27e83a Compare July 6, 2024 20:08
@galnoam galnoam requested review from pasis and iftahl and removed request for pasis July 7, 2024 08:27
Copy link
Collaborator

@iftahl iftahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets squash to 1 commit and describe changes in commit description

@BasharRadya
Copy link
Collaborator Author

bot:retest

@BasharRadya BasharRadya force-pushed the coverity branch 5 times, most recently from 48c35cc to b8cd008 Compare July 9, 2024 22:09
@BasharRadya
Copy link
Collaborator Author

bot:retest

@BasharRadya
Copy link
Collaborator Author

bot:retest

@iftahl
Copy link
Collaborator

iftahl commented Jul 10, 2024

replace "HPCINFRA-1734" in commit messages to XLIO's ticket number

Upgrade coverity to version 2023.12

Signed-off-by: Bashar Abdelgafer  <babdelgafer@nvidia.com>
Removed redundant if check after ensuring buffer stack initialization
Suppressed Coverity null dereference warning (False Positive)

Initialized uninitialized class members stats_file and m_ioctl
in mce_sys_var constructor

Checked return value of gettime() in timer constructor
and added error logging

Signed-off-by: Bashar Abdelgafer  <babdelgafer@nvidia.com>
- Use move constructors and assignment operators for m_source,
ring_allocation_logic, m_ip_addrs, and source_t to replace copy
constructors and assignment
- Simplify event_data_t initialization with concise constructor
calls in event_handler_manager.cpp, causing assigned objects to
be temporary rvalue references which invoke move semantics
- Add specialized constructors for EV_IBVERBS, EV_RDMA_CM
and EV_COMMAND types in event_data_t
- Remove use of std::forward in ip_address constructor because
addr is used afterward and would be in an unknown state if moved

Signed-off-by: Bashar Abdelgafer  <babdelgafer@nvidia.com>
Guard m_error_queue in handle_recv_errqueue with lock when checking
if it's empty since it's a shared resource. handle_recv_errqueue is
only called in a few cases when the flag MSG_ERRQUEUE is set,
so this change will cause no degradation

Change iftype_value from char to int in get_iftype_from_ifname
since iftype_value, which is returned from the function, is
derived from atoi, which returns an int

Change proto variable 16-bit positive number type from short
to uint16_t, and update all occurrences in all functions

Signed-off-by: Bashar Abdelgafer  <babdelgafer@nvidia.com>
Suppress irrelevant and false positive Coveritywarnings
in various files using comments
Turn off Coverity checks for sum of null dereference
overflow, missing lock, assigned pointer, copy assignment call
and other identified issues

Signed-off-by: Bashar Abdelgafer  <babdelgafer@nvidia.com>
@galnoam
Copy link
Collaborator

galnoam commented Jul 10, 2024

@BasharRadya , please move to fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants