KhronosGroup / KhronosGroup/Vulkan-ValidationLayers

Image views, when used-after-free in a framebuffer, does not raise validation error; segfaults under renderdoc.

Open
#10,448 6 comments 0 reactions 1 assignee View on GitHub

@spencer-lunarg is already working on this.

Since Jul 25, 2025.

Incomplete
Dominant language
C++
Stars
1k
Forks
505
Avg merge
11h 25m
Merged PRs (30d)
229

Description

Describe the situation in which you encountered the missing validation

Get setup up:

git clone https://github.com/gfx-rs/wgpu.git
git checkout v26.0.1
cargo build -p wgpu-examples

This will build a binary in target/debug/wgpu-examples.exe. (remove exe for *nix). Run this binary with the argument cube. If you are running on an AMD gpu, you will notice that the rendering may flicker. This is because of the code using a framebuffer which points to a deleted image view. The program automatically enables the validation layers, if they are available. There are no validation warnings, however. You can validate this by setting the env var RUST_LOG=wgpu_hal=info to see info level logs.

On any gpu, run the program under renderdoc. The program will crash. If you run under renderdoc and a debugger, you will notice it crashes inside the validation layers, while trying to validate the image views.

This was a bit convoluted to find, so let me know if anything else is needed.

Valid Usage IDs requested
I'm honestly unsure where to find the rules against use-after-free.

Additional Context
Windows 11
Replicated on Nvidia, AMD.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.