mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
hk: fill sparse.write with nonzero values
fuzz for bugs. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34585>
This commit is contained in:
parent
ffac153bcf
commit
e5006dc6ae
1 changed files with 5 additions and 0 deletions
|
|
@ -65,6 +65,11 @@ hk_upload_rodata(struct hk_device *dev)
|
|||
if (!dev->rodata.bo || !dev->sparse.write)
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
|
||||
/* The contents of sparse.write are undefined, but making them nonzero helps
|
||||
* fuzz for bugs where we incorrectly read from the write section.
|
||||
*/
|
||||
memset(agx_bo_map(dev->sparse.write), 0xCA, AIL_PAGESIZE);
|
||||
|
||||
uint8_t *map = agx_bo_map(dev->rodata.bo);
|
||||
uint32_t offs = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue