diff options
author | Jason Ekstrand <[email protected]> | 2019-05-14 10:20:35 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-05-14 12:30:22 -0500 |
commit | 5911abd76f8e28c9ca4921ea06ff8578b4b77f72 (patch) | |
tree | 4dda6e77891753c8163f49b290269553df5b0ac1 | |
parent | 88cac12230807456824d1f86f990a3926371a198 (diff) |
util/ra: Assert nodes are in-bounds in add_node_interference
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/util/register_allocate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 94528f7ce49..fe00af67283 100644 --- a/src/util/register_allocate.c +++ b/src/util/register_allocate.c @@ -572,6 +572,7 @@ void ra_add_node_interference(struct ra_graph *g, unsigned int n1, unsigned int n2) { + assert(n1 < g->count && n2 < g->count); if (n1 != n2 && !BITSET_TEST(g->nodes[n1].adjacency, n2)) { ra_add_node_adjacency(g, n1, n2); ra_add_node_adjacency(g, n2, n1); |