Skip to content

Fix Coverity issues in RAVL tree #717

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

Conversation

ldorau
Copy link
Contributor

@ldorau ldorau commented Sep 10, 2024

Description

Fix Coverity issues in RAVL tree:

  • 468502 Dereference after null check
  • 462949 Overflowed return value

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

Fix Coverity issues in RAVL tree:
- 468502 Dereference after null check
- 462949 Overflowed return value

Signed-off-by: Lukasz Dorau <[email protected]>
@ldorau ldorau requested a review from pbalcer September 10, 2024 09:08
@ldorau ldorau marked this pull request as ready for review September 10, 2024 09:11
@ldorau ldorau requested a review from a team as a code owner September 10, 2024 09:11
@lukaszstolarczuk lukaszstolarczuk merged commit 6c2c767 into oneapi-src:main Sep 10, 2024
66 checks passed
@ldorau ldorau deleted the Fix_Coverity_issues_in_RAVL_tree branch September 10, 2024 15:31
ldorau added a commit to ldorau/unified-memory-framework that referenced this pull request Sep 11, 2024
Fix assert in ravl_node_rank_difference_parent().
ravl_node_rank() do not have to be positive - it can return (-1),
so the assert has to be corrected.

For example:
if ravl_node_rank(p) = 0 and ravl_node_rank(n) = -1, then rv = 1.

Ref: oneapi-src#717

Signed-off-by: Lukasz Dorau <[email protected]>
ldorau added a commit to ldorau/unified-memory-framework that referenced this pull request Sep 11, 2024
Fix assert in ravl_node_rank_difference_parent().
ravl_node_rank() do not have to be positive - it can return (-1),
so the assert has to be corrected.

For example:
if ravl_node_rank(p) = 0 and ravl_node_rank(n) = -1, then rv = 1.

Ref: oneapi-src#717

Signed-off-by: Lukasz Dorau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants