Skip to content

fix(ibverbs): prevent segfault when ibv_create_qp_ex fail to create qp#101

Merged
dragonJACson merged 1 commit intomainfrom
dev/fix-build-ex
Apr 20, 2026
Merged

fix(ibverbs): prevent segfault when ibv_create_qp_ex fail to create qp#101
dragonJACson merged 1 commit intomainfrom
dev/fix-build-ex

Conversation

@dragonJACson
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a helper function extended_qp_from_raw to centralize the conversion of raw queue pairs to extended queue pairs and refactors the QueuePairBuilder to use it. A review comment suggests simplifying the helper by removing an unnecessary null check on the result of ibv_qp_to_qp_ex, recommending the use of NonNull::new_unchecked with a safety comment instead.

Comment thread src/ibverbs/queue_pair.rs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a potential segfault path when ibv_create_qp_ex fails by ensuring null QP pointers are rejected before attempting ibv_qp_to_qp_ex conversion.

Changes:

  • Added extended_qp_from_raw helper to validate/create NonNull<ibv_qp_ex> from the raw QP pointer.
  • Updated QueuePairBuilder::build_ex to use the helper and early-return on failure.
  • Added a unit test covering the null-QP rejection path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ibverbs/queue_pair.rs Outdated
Comment thread src/ibverbs/queue_pair.rs Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 29, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ibverbs/queue_pair.rs 80.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/ibverbs/queue_pair.rs 88.34% <80.00%> (-0.03%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dragonJACson dragonJACson force-pushed the dev/fix-build-ex branch 2 times, most recently from 0d4dde1 to 314f451 Compare March 29, 2026 04:37
@dragonJACson dragonJACson requested a review from Copilot March 29, 2026 05:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ibverbs/queue_pair.rs Outdated
Comment thread src/ibverbs/queue_pair.rs Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ibverbs/queue_pair.rs Outdated
Comment thread src/ibverbs/queue_pair.rs Outdated
@dragonJACson dragonJACson requested a review from FujiZ March 29, 2026 07:41
Comment thread src/ibverbs/queue_pair.rs Outdated
Comment thread src/ibverbs/queue_pair.rs Outdated
@dragonJACson dragonJACson force-pushed the dev/fix-build-ex branch 4 times, most recently from 13c8f21 to 8a63bde Compare April 11, 2026 10:12
@dragonJACson dragonJACson requested a review from Copilot April 11, 2026 10:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ibverbs/queue_pair.rs
Comment thread src/ibverbs/queue_pair.rs Outdated
Comment thread .github/workflows/test.yml Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dragonJACson dragonJACson merged commit c133119 into main Apr 20, 2026
9 checks passed
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