From 667e14e7bd759a77e732c4de09fb978ee3816eaf Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 5 Mar 2020 22:13:24 +0100 Subject: [PATCH] nir/validate: validate the stride for deref_ptr_as_array Signed-off-by: Karol Herbst Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir_validate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index 998017d504a..70ddda3e98b 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -482,6 +482,7 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state) parent->deref_type == nir_deref_type_array || parent->deref_type == nir_deref_type_ptr_as_array || parent->deref_type == nir_deref_type_cast); + validate_assert(state, nir_deref_instr_ptr_as_array_stride(parent)); validate_src(&instr->arr.index, state, nir_dest_bit_size(instr->dest), 1); break; -- 2.30.2