From ac95bb45e821f5ae89e23b1b10bb8e62cdf81a76 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 31 Jul 2020 10:36:35 -0500 Subject: [PATCH] nir: Initialize nir_ssa_def::live_index Previously, this was left uninitialized. Let's initialize it to an obviously bogus value so we notice if anyone ever tries to use stale liveness data. Reviewed-by: Caio Marcelo de Oliveira Filho Reviewed-by: Jesse Natalie Part-of: --- src/compiler/nir/nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index d8ff265d9f3..2fe9c6e295c 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -1489,6 +1489,7 @@ nir_ssa_def_init(nir_instr *instr, nir_ssa_def *def, unsigned bit_size, const char *name) { def->name = ralloc_strdup(instr, name); + def->live_index = UINT_MAX; /* Something clearly OOB */ def->parent_instr = instr; list_inithead(&def->uses); list_inithead(&def->if_uses); -- 2.30.2