spirv: Assert that vtn_pointer_to_deref() doesn't return NULL
There are a few things that could cause us to return NULL here and we should just fail to parse the SPIR-V if that ever happens instead of crashing when someone tries to access it. Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36427>
This commit is contained in:
committed by
Marge Bot
parent
8a993cf900
commit
d1be63c355
@@ -524,6 +524,8 @@ vtn_pointer_to_deref(struct vtn_builder *b, struct vtn_pointer *ptr)
|
||||
ptr = vtn_pointer_dereference(b, ptr, &chain);
|
||||
}
|
||||
|
||||
vtn_assert(ptr->deref != NULL);
|
||||
|
||||
return ptr->deref;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user