fix(ibverbs): prevent segfault when ibv_create_qp_ex fail to create qp#101
fix(ibverbs): prevent segfault when ibv_create_qp_ex fail to create qp#101dragonJACson wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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_rawhelper to validate/createNonNull<ibv_qp_ex>from the raw QP pointer. - Updated
QueuePairBuilder::build_exto 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.
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (57.14%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage.
🚀 New features to boost your workflow:
|
0d4dde1 to
314f451
Compare
There was a problem hiding this comment.
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.
Signed-off-by: Luke Yue <lukedyue@gmail.com>
314f451 to
92d5a18
Compare
There was a problem hiding this comment.
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.
No description provided.