anv: Fix potential overflow from doing 32bit math on 64bit types
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

By using a 64bit unsigned to iterate instead of a plain unsigned

CID: 1646981
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35243>
This commit is contained in:
Dylan Baker 2025-05-29 12:39:54 -07:00 committed by Marge Bot
parent a6102f7432
commit 79f4eca2f0

View file

@ -293,7 +293,7 @@ anv_slab_alloc(void *priv,
struct anv_bo *bo = &slab->entries[i];
uint64_t offset = intel_48b_address(slab->bo->offset);
offset += (i * entry_size);
offset += ((uint64_t)i * entry_size);
bo->name = "slab_child";
bo->gem_handle = slab->bo->gem_handle;