From abcb0f6cf51d2de03c0e2f03ac3ba4a755bb65eb Mon Sep 17 00:00:00 2001 From: Valentine Burley Date: Mon, 11 May 2026 12:50:44 +0200 Subject: [PATCH] tu/autotune: Clear active_batches before history objects are freed Fixes use-after-free errors during device destruction. Fixes: 40ffc052aff ("tu: Rewrite autotune in C++") Signed-off-by: Valentine Burley Part-of: --- src/freedreno/vulkan/tu_autotune.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedreno/vulkan/tu_autotune.cc b/src/freedreno/vulkan/tu_autotune.cc index aa6c7f816dd..49cc1e4309d 100644 --- a/src/freedreno/vulkan/tu_autotune.cc +++ b/src/freedreno/vulkan/tu_autotune.cc @@ -1698,6 +1698,7 @@ tu_autotune::~tu_autotune() at_log_base("finished processing all entries"); } + active_batches.clear(); tu_bo_suballocator_finish(&suballoc); }