You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dominator trees depend on CFG's pseudo entry and exit blocks. When CFG is invalidated, dominator trees contain dangling pointers. This causes assertion failures later in the program.
The bug was found by inspecting an assertion failure in the attached shader. The failure happens in
when one tries to run spirv-opt <attached file> -o out.spv --validate-after-all --if-conversion --merge-return. --if-conversion is used only to initialize dominator trees before --merge-return is executed.
data.zip contains a GLSL shader and its compiled SPIR-V version.
In BuildInvalidAnalyses, we state that it will only rebuild the invalid
analysies. However, the code will rebuils all analyses that have been
requested, even if they were already valid.
We fix that, and add a couple tests. The tests cannot check every
analysis because there are no visible differences for all of the
analyses. We test two of them as representatives. Note that the new
code is generic, so this should be good enough.
FixesKhronosGroup#3635
s-perron
added a commit
to s-perron/SPIRV-Tools
that referenced
this issue
Mar 1, 2022
In BuildInvalidAnalyses, we state that it will only rebuild the invalid
analyses. However, the code will rebuild all analyses that have been
requested, even if they were already valid.
We fix that, and add a couple tests. The tests cannot check every
analysis because not all of the analyses have visible sideeffects of
being rebuilt. We test two of them as representatives. Note that the new
code is generic, so this should be good enough.
FixesKhronosGroup#3635
MergeReturnPass
invalidates CFG but doesn't invalidate dominator trees hereSPIRV-Tools/source/opt/merge_return_pass.cpp
Lines 429 to 431 in b78f4b1
Dominator trees depend on CFG's pseudo entry and exit blocks. When CFG is invalidated, dominator trees contain dangling pointers. This causes assertion failures later in the program.
The bug was found by inspecting an assertion failure in the attached shader. The failure happens in
SPIRV-Tools/source/opt/basic_block.h
Lines 119 to 120 in b78f4b1
when one tries to run
spirv-opt <attached file> -o out.spv --validate-after-all --if-conversion --merge-return
.--if-conversion
is used only to initialize dominator trees before--merge-return
is executed.data.zip contains a GLSL shader and its compiled SPIR-V version.
Can be reproduced on b78f4b1.
The text was updated successfully, but these errors were encountered: