Repository navigation
fix(hipstdpar): fix zero size hipMemAdvice() issue - #12110
Merged
Merged
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #12110 +/- ##
===========================================
- Coverage 70.27% 69.95% -0.33%
===========================================
Files 2812 2833 +21
Lines 462318 463790 +1472
Branches 68085 68381 +296
===========================================
- Hits 324891 324410 -481
- Misses 113896 116050 +2154
+ Partials 23531 23330 -201
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
amd-jmahovsky
commented
Sep 16, 2026
amd-jmahovsky
commented
Sep 16, 2026
assistant-librarian Bot
pushed a commit
to ROCm/rocThrust
that referenced
this pull request
Sep 16, 2026
fix(hipstdpar): fix zero size hipMemAdvice() issue ## Motivation Fixes a process abort when any zero-size allocation (operator new(0), new T[0], malloc(0), an empty std::vector/container triggering a 0-byte allocator call, etc.) when compiling with --hipstdpar --hipstdpar-interpose-alloc. JIRA ID: ROCM-30883 ## Technical Details Don't call hipMemAdvise() in __hipstdpar_aligned_alloc() if the allocation is zero size. ## Test Plan The unit tests and ticket reproducer all pass. A new test was also added to test zero-size allocations. ## Test Result Tests pass. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
Contributor
TheRock Submodule Bump ActivityNewest first
|
1 task done
stanleytsang-amd
pushed a commit
that referenced
this pull request
Oct 2, 2026
## Motivation Fixes a process abort when any zero-size allocation (operator new(0), new T[0], malloc(0), an empty std::vector/container triggering a 0-byte allocator call, etc.) when compiling with --hipstdpar --hipstdpar-interpose-alloc. JIRA ID: ROCM-30883 ## Technical Details Don't call hipMemAdvise() in __hipstdpar_aligned_alloc() if the allocation is zero size. ## Test Plan The unit tests and ticket reproducer all pass. A new test was also added to test zero-size allocations. ## Test Result Tests pass. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
Naraenda
pushed a commit
that referenced
this pull request
Oct 5, 2026
## Motivation Fixes a process abort when any zero-size allocation (operator new(0), new T[0], malloc(0), an empty std::vector/container triggering a 0-byte allocator call, etc.) when compiling with --hipstdpar --hipstdpar-interpose-alloc. JIRA ID: ROCM-30883 ## Technical Details Don't call hipMemAdvise() in __hipstdpar_aligned_alloc() if the allocation is zero size. ## Test Plan The unit tests and ticket reproducer all pass. A new test was also added to test zero-size allocations. ## Test Result Tests pass. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
Naraenda
pushed a commit
that referenced
this pull request
Oct 7, 2026
## Motivation Fixes a process abort when any zero-size allocation (operator new(0), new T[0], malloc(0), an empty std::vector/container triggering a 0-byte allocator call, etc.) when compiling with --hipstdpar --hipstdpar-interpose-alloc. JIRA ID: ROCM-30883 ## Technical Details Don't call hipMemAdvise() in __hipstdpar_aligned_alloc() if the allocation is zero size. ## Test Plan The unit tests and ticket reproducer all pass. A new test was also added to test zero-size allocations. ## Test Result Tests pass. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Fixes a process abort when any zero-size allocation (operator new(0), new T[0], malloc(0), an empty std::vector/container triggering a 0-byte allocator call, etc.) when compiling with --hipstdpar --hipstdpar-interpose-alloc.
JIRA ID: ROCM-30883
Technical Details
Don't call hipMemAdvise() in __hipstdpar_aligned_alloc() if the allocation is zero size.
Test Plan
The unit tests and ticket reproducer all pass. A new test was also added to test zero-size allocations.
Test Result
Tests pass.
Submission Checklist