mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
elk: Avoid reading past the end of p->store
On the last iteration of the loop, `offset` will point to the location
just beyond the last instruction in the program. If the program exactly
fills `p->store` then calling `next_offset()` will read out of bounds.
Instead just let the inner while loop call `next_offset()` one
additional time.
Fixes: a35b9cb625 ("i965: Add annotation data structure and support code.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12486
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
This commit is contained in:
parent
88fd100f97
commit
7c6f4a6041
1 changed files with 0 additions and 2 deletions
|
|
@ -2127,8 +2127,6 @@ elk_compact_instructions(struct elk_codegen *p, int start_offset,
|
|||
}
|
||||
|
||||
group->offset = start_offset + offset;
|
||||
|
||||
offset = next_offset(devinfo, store, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue