Skip to content

potential off by one in amdgpu_fetch #2584

@dirkmueller

Description

@dirkmueller

for (i = 0; i <= numpmid; i++) {
unsigned int cluster = pmID_cluster(pmidlist[i]);
unsigned int item = pmID_item(pmidlist[i]);

it appears to me that this pmidlist array has numpmid elements, so it should go from 0 to numpmid-1, while it uses <= here. many other for loops in that code are using < instead. is this a fencepost error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions