From 506a467f16453fe51c65f3f14fb2a37d5ba662d2 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 5 Jan 2016 15:56:59 -0800 Subject: [PATCH] nir/spirv/cfg: Assert that blocks only ever get added once This effectively prevents infinite loops in cfg_walk_blocks. --- src/glsl/nir/spirv/vtn_cfg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glsl/nir/spirv/vtn_cfg.c b/src/glsl/nir/spirv/vtn_cfg.c index a8e149a00a6..646b960d179 100644 --- a/src/glsl/nir/spirv/vtn_cfg.c +++ b/src/glsl/nir/spirv/vtn_cfg.c @@ -281,6 +281,7 @@ vtn_cfg_walk_blocks(struct vtn_builder *b, struct list_head *cf_list, continue; } + assert(block->node.link.next == NULL); list_addtail(&block->node.link, cf_list); switch (*block->branch & SpvOpCodeMask) { -- 2.30.2