[Intel-gfx] [PATCH i-g-t 1/3] instdone: Add an assert to make sure we never overflow instdone_bits
Damien Lespiau
damien.lespiau at intel.com
Tue Jun 4 17:59:18 CEST 2013
Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
lib/instdone.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/instdone.c b/lib/instdone.c
index 4679a9c..ad5c62f 100644
--- a/lib/instdone.c
+++ b/lib/instdone.c
@@ -37,6 +37,7 @@ int num_instdone_bits = 0;
static void
add_instdone_bit(uint32_t reg, uint32_t bit, const char *name)
{
+ assert(num_instdone_bits < MAX_INSTDONE_BITS);
instdone_bits[num_instdone_bits].reg = reg;
instdone_bits[num_instdone_bits].bit = bit;
instdone_bits[num_instdone_bits].name = name;
--
1.8.1.4
More information about the Intel-gfx
mailing list