Skip to content

Consistent crash in MinimizeGroupCost - Out of Bounds #5

Description

@hytel

In the MinimizeGroupCost method, there is a loop on v, and inside that a loop on fr. Looks like fr indicates in part how many items have been processed and removed from the gid_track list. It's very confusing and uncommented code. It looks like elements are being removed from "gid_track" and added to "track". The problem is that there is a "gid_track[0].pop_back()" to remove the last item. But right after that, a check is made against the last element at (tSize - 1 - fr). But, this element position was just removed. What exactly is the intent of this loop on "fr" inside a loop on "v" ?

It looks like you fixed this in a previous issue, but brought it back more recently in an optimization check-in. Was this a mistake?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions