KhronosGroup / KhronosGroup/SPIRV-Tools
spirv-val should report SPIR-V file as invalid due to jump from loop to non-merge block
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 709
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
[SPIR-V binary in this archive illustrates the problem](https://github.com/KhronosGroup/SPIRV-Tools/files/2541463/spirv-val-bug.zip).
Quoting @greg-lunarg from #2018:
> Pretty sure that [bad].spv is invalid: it contains a branch in a loop to a block outside the loop (%46) that is not the loop's merge block.
spirv-val should ideally catch this; current version does not.
Found indirectly using [GraphicsFuzz](https://github.com/google/graphicsfuzz).
Contributor guide
Research direction
Start by reproducing the report with the SPIR-V binary in the linked archive and the spirv-val entry point. Trace validation of the branch from the loop to block %46, using issue #2018 for context. Done means spirv-val rejects the invalid module and includes a regression test for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100