From: Slawomir Cygan Date: Wed, 18 Apr 2018 13:56:37 +0000 (+0200) Subject: Fix VkPipelineLayout use after free X-Git-Tag: upstream/1.3.5~2565^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2060fc7fb1e62953bc9516540b63c131e25d2f0c;p=platform%2Fupstream%2FVK-GL-CTS.git Fix VkPipelineLayout use after free The test destroys pipeline layout, used to create the graphics pipeline, before the command buffer using this pipeline is recorded. This is invalid according to spec: "A VkPipelineLayout object must not be destroyed while any command buffer that uses it is in the recording state." Components: Vulkan VK-GL-CTS Issue: 1134 Affects: dEQP-VK.draw.differing_interpolation.* Change-Id: I2dd692cfb69afaf0b9d6e8d8a29b86b945b7eaba --- diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawDifferingInterpolationTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawDifferingInterpolationTests.cpp index 34fdd82..430a21e 100644 --- a/external/vulkancts/modules/vulkan/draw/vktDrawDifferingInterpolationTests.cpp +++ b/external/vulkancts/modules/vulkan/draw/vktDrawDifferingInterpolationTests.cpp @@ -248,10 +248,11 @@ tcu::TestStatus DrawTestInstance::iterate (void) flushMappedMemoryRange(vk, device, vertexBuffer->getBoundMemory().getMemory(), vertexBuffer->getBoundMemory().getOffset(), VK_WHOLE_SIZE); } + const PipelineLayoutCreateInfo pipelineLayoutCreateInfo; + Move pipelineLayout = createPipelineLayout(vk, device, &pipelineLayoutCreateInfo); + // Create pipeline { - const PipelineLayoutCreateInfo pipelineLayoutCreateInfo; - Move pipelineLayout = createPipelineLayout(vk, device, &pipelineLayoutCreateInfo); const PipelineCreateInfo::ColorBlendState::Attachment vkCbAttachmentState; VkViewport viewport;