Skip to content

pmdaamdgpu: Prevent out-of-bound references in amdgpu_fetch function#2585

Merged
wcohen merged 1 commit into
performancecopilot:mainfrom
wcohen:wcohen/amdgpu_1
May 9, 2026
Merged

pmdaamdgpu: Prevent out-of-bound references in amdgpu_fetch function#2585
wcohen merged 1 commit into
performancecopilot:mainfrom
wcohen:wcohen/amdgpu_1

Conversation

@wcohen
Copy link
Copy Markdown
Contributor

@wcohen wcohen commented May 6, 2026

The valid range of indices for the pmidlist array is 0 to numpmid-1. The loop in amdgpu_fetch was incorrectly using a "i <= numpmid" rather than "i < numpmid" to terminate the loop.

Resolves: #2584

The valid range of indices for the pmidlist array is 0 to numpmid-1.
The loop in amdgpu_fetch was incorrectly using a "i <= numpmid" rather
than "i < numpmid" to terminate the loop.

Resolves: performancecopilot#2584
@natoscott
Copy link
Copy Markdown
Member

@wcohen LGTM

@wcohen wcohen merged commit 143bb59 into performancecopilot:main May 9, 2026
23 checks passed
@wcohen wcohen deleted the wcohen/amdgpu_1 branch May 9, 2026 20:44
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.

potential off by one in amdgpu_fetch

2 participants