Conor McCarthy (@cmccarthy) commented about libs/vkd3d-shader/ir.c:
* that the block is empty. */ struct vkd3d_shader_instruction *begin, *end; struct vsir_block_list predecessors, successors; + uint32_t *dominates; };
-static void vsir_block_init(struct vsir_block *block, unsigned int label) +static enum vkd3d_result vsir_block_init(struct vsir_block *block, unsigned int label, unsigned int block_count) { + size_t dominates_size; + + if (!align_to_size(block_count, sizeof(*block->dominates) * CHAR_BIT, &dominates_size))
Or something like: `if (SIZE_MAX / sizeof(*block->dominates) / CHAR_BIT < block_count)` And then just use the existing `align()`. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/656#note_62158