Commit f7d14604 authored by Dave Airlie's avatar Dave Airlie

gallivm: zero init the temporary register storage.

Due to flow control we can end up with random values in here having
side effects.

This fixes a crash in gtk4-demo.

Fixes: 44a6b010 ("gallivm: add nir->llvm translation (v2)")
Reviewed-by: default avatarRoland Scheidegger <>
Part-of: <!7327>
parent 17613794
Pipeline #220563 waiting for manual action with stages
in 56 seconds
......@@ -2215,8 +2215,8 @@ bool lp_build_nir_llvm(
nir_foreach_register(reg, &func->impl->registers) {
LLVMTypeRef type = get_register_type(bld_base, reg);
LLVMValueRef reg_alloc = lp_build_alloca_undef(bld_base->base.gallivm,
type, "reg");
LLVMValueRef reg_alloc = lp_build_alloca(bld_base->base.gallivm,
type, "reg");
_mesa_hash_table_insert(bld_base->regs, reg, reg_alloc);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment