From 8ffdad731cd8d8900c10810b61283afffa142f29 Mon Sep 17 00:00:00 2001 From: Friedrich Vock Date: Sun, 12 Nov 2023 21:00:04 +0100 Subject: [PATCH] vulkan: Don't use set_foreach_remove when destroying pipeline caches set_foreach_remove assumes no entries have been removed. That assumption only holds if no errors occur, since pipeline cache objects can get removed if an error occurs during deserialization. This fixes dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic crashing on RADV. Cc: mesa-stable Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Samuel Pitoiset Reviewed-by: Faith Ekstrand Part-of: --- src/vulkan/runtime/vk_pipeline_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vulkan/runtime/vk_pipeline_cache.c b/src/vulkan/runtime/vk_pipeline_cache.c index d5988952a5b..71471dd0239 100644 --- a/src/vulkan/runtime/vk_pipeline_cache.c +++ b/src/vulkan/runtime/vk_pipeline_cache.c @@ -659,7 +659,7 @@ vk_pipeline_cache_destroy(struct vk_pipeline_cache *cache, { if (cache->object_cache) { if (!cache->weak_ref) { - set_foreach_remove(cache->object_cache, entry) { + set_foreach(cache->object_cache, entry) { vk_pipeline_cache_object_unref(cache->base.device, (void *)entry->key); } } else {