Fix in shadercacheLoad
authorPanagiotis Apostolou <panagiotis.apostolou@arm.com>
Thu, 10 Oct 2019 13:33:32 +0000 (15:33 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 16 Oct 2019 11:39:10 +0000 (07:39 -0400)
commit0084230d249be66da6deeb5a97beae727686d2b6
tree878e4960aa49b79c9992ffb8d2b271305a8132af
parent2970bb2a0ab542c2c4c7f48b767b31c238f4ec78
Fix in shadercacheLoad

There is a slim chance that function shadercacheLoad() can pass a null
pointer into the std::string constructor, causing an exception. This can
happen in the case there is a mismatch between the calculated hash and
the one stored in the cache file.

This commit makes the code more robust, handling this case as a miss.

Components: Vulkan

VK-GL-CTS issue: 2052

Change-Id: I84a382dec51f487314304ec9057cefdff22920c3
external/vulkancts/framework/vulkan/vkPrograms.cpp