Skip to content

fix(hip-tests) - Free the imported pointer to avoid mem leaks - #11023

Merged
satyanveshd merged 1 commit into
developfrom
users/sdittaka/fixleakmempoolshareablehandle
Sep 7, 2026
Merged

satyanveshd merged 1 commit into
developfrom
users/sdittaka/fixleakmempoolshareablehandle

Conversation

@satyanveshd

@satyanveshd satyanveshd commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Address memory leaks in the hip mempool shareable handle contract tests.

Technical Details

The imported pointer from the imported mempool using shareable handle is freed using hipFree.

Issue Tracking

JIRA ID: ROCM-30215

Test Plan

Test should not report any memory leaks when run with ASAN builds.

Test Result

No Leaks

Submission Checklist

Copilot AI lite review requested due to automatic review settings September 1, 2026 07:08
@satyanveshd
satyanveshd requested a review from a team as a code owner September 1, 2026 07:08
@therock-pr-bot

therock-pr-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses memory leaks in the HIP mempool shareable-handle contract test by ensuring the device pointer returned by hipMemPoolImportPointer is freed during teardown, even on assertion failure.

Changes:

  • Register a scope-exit cleanup action to hipFree() the imported pointer created via hipMemPoolImportPointer.
  • Add explanatory comments clarifying the imported pool reference lifetime and why freeing the imported pointer is required.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@satyanveshd
satyanveshd merged commit 8421945 into develop Sep 7, 2026
113 of 141 checks passed
@satyanveshd
satyanveshd deleted the users/sdittaka/fixleakmempoolshareablehandle branch September 7, 2026 07:13
@systems-assistant

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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.

3 participants