From 7ebcc8d402f6f1cd5346270404bb718640c86142 Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Fri, 23 May 2025 11:50:50 +0200 Subject: [PATCH] ir3: don't free constant_data after assembling When using shader overrides, the assembler will be called a 2nd time which will try to dereference the freed constant_data. Fix this by not explicitly freeing constant_data, it's ralloc'd in the context of the shader variant anyway so will be freed automatically. Signed-off-by: Job Noorman Part-of: --- src/freedreno/ir3/ir3_shader.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/freedreno/ir3/ir3_shader.c b/src/freedreno/ir3/ir3_shader.c index 2418f310e67..5a1104668d4 100644 --- a/src/freedreno/ir3/ir3_shader.c +++ b/src/freedreno/ir3/ir3_shader.c @@ -152,8 +152,6 @@ ir3_shader_assemble(struct ir3_shader_variant *v) if (v->constant_data_size) memcpy(&bin[info->constant_data_offset / 4], v->constant_data, v->constant_data_size); - ralloc_free(v->constant_data); - v->constant_data = NULL; /* NOTE: if relative addressing is used, we set constlen in * the compiler (to worst-case value) since we don't know in