Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssa-rewrite then loop-unswitch leads to code for which the validator claims an id is defined more than once #2203

Closed
afd opened this issue Dec 17, 2018 · 0 comments
Assignees
Labels
fuzzer-found-issue A note that an issue was found using a fuzzer tool (e.g. GraphicsFuzz)

Comments

@afd
Copy link
Contributor

afd commented Dec 17, 2018

0046.zip

"command" in the attachment gives the command necessary to repro the bug.

Found using GraphicsFuzz.

@s-perron s-perron self-assigned this Dec 17, 2018
@dneto0 dneto0 added the fuzzer-found-issue A note that an issue was found using a fuzzer tool (e.g. GraphicsFuzz) label Dec 18, 2018
s-perron added a commit to s-perron/SPIRV-Tools that referenced this issue Dec 18, 2018
Folding branches can have a lot of special cases, and can be a little
error prone.  So I only want it in one place.  That will be in dead
branch elimination.  I will change loop unswitching to set the branches
that were being folded to have a constant condition.  Then subsequent
pass of dead branch elimination will be able to remove the code.

At the same time, I added a check that loop unswitching will not
unswitch a branch with a constant condition.  It is not useful to do it
because dead branch elimination will simple fold the branch anyway.
Also it avoid an infinite loop that would other wise be introduced by my
first change.

Fixes KhronosGroup#2203.
s-perron added a commit to s-perron/SPIRV-Tools that referenced this issue Dec 18, 2018
Folding branches can have a lot of special cases, and can be a little
error prone.  So I only want it in one place.  That will be in dead
branch elimination.  I will change loop unswitching to set the branches
that were being folded to have a constant condition.  Then subsequent
pass of dead branch elimination will be able to remove the code.

At the same time, I added a check that loop unswitching will not
unswitch a branch with a constant condition.  It is not useful to do it
because dead branch elimination will simple fold the branch anyway.
Also it avoid an infinite loop that would other wise be introduced by my
first change.

Fixes KhronosGroup#2203.
s-perron added a commit to s-perron/SPIRV-Tools that referenced this issue Dec 18, 2018
Folding branches can have a lot of special cases, and can be a little
error prone.  So I only want it in one place.  That will be in dead
branch elimination.  I will change loop unswitching to set the branches
that were being folded to have a constant condition.  Then subsequent
pass of dead branch elimination will be able to remove the code.

At the same time, I added a check that loop unswitching will not
unswitch a branch with a constant condition.  It is not useful to do it
because dead branch elimination will simple fold the branch anyway.
Also it avoid an infinite loop that would other wise be introduced by my
first change.

Fixes KhronosGroup#2203.
s-perron added a commit to s-perron/SPIRV-Tools that referenced this issue Dec 18, 2018
Folding branches can have a lot of special cases, and can be a little
error prone.  So I only want it in one place.  That will be in dead
branch elimination.  I will change loop unswitching to set the branches
that were being folded to have a constant condition.  Then subsequent
pass of dead branch elimination will be able to remove the code.

At the same time, I added a check that loop unswitching will not
unswitch a branch with a constant condition.  It is not useful to do it
because dead branch elimination will simple fold the branch anyway.
Also it avoid an infinite loop that would other wise be introduced by my
first change.

Fixes KhronosGroup#2203.
s-perron added a commit that referenced this issue Dec 19, 2018
* Don't fold specialized branchs in loop unswitch

Folding branches can have a lot of special cases, and can be a little
error prone.  So I only want it in one place.  That will be in dead
branch elimination.  I will change loop unswitching to set the branches
that were being folded to have a constant condition.  Then subsequent
pass of dead branch elimination will be able to remove the code.

At the same time, I added a check that loop unswitching will not
unswitch a branch with a constant condition.  It is not useful to do it
because dead branch elimination will simple fold the branch anyway.
Also it avoid an infinite loop that would other wise be introduced by my
first change.

Fixes #2203.
dneto0 pushed a commit to dneto0/SPIRV-Tools that referenced this issue Sep 14, 2024
Roll third_party/glslang/ f03cb29..b5f003d (7 commits)

KhronosGroup/glslang@f03cb29...b5f003d

$ git log f03cb29..b5f003d --date=short --no-merges --format='%ad %ae %s'
2020-05-01 cepheus Fix KhronosGroup#2191: Error check for indexing reference containing unsize array.
2020-05-01 cepheus GLSL: Separate out swizzle handling (potentially fixing bugs).
2020-04-21 pmistry Add support for es extension GL_EXT_blend_func_extended * Introduces builtin variables gl_SecondaryFragColorEXT and gl_SecondaryFragDataEXT * Introduces builtin constant gl_MaxDualSourceDrawBuffersEXT * enables support for layout qualifier "index" in es profile
2020-04-30 63069047+pmistryNV Add support for extension GL_EXT_shader_integer_mix (KhronosGroup#2203)
2020-04-26 pmistry Add support for extension GL_EXT_shader_implicit_conversions Updated extension management in TIntermediate class.
2020-04-30 cepheus Fix KhronosGroup#2201: Improve const and copy constructor for TVarLivePair.
2020-04-29 63069047+pmistryNV Add support for extension GL_ARB_vertex_attrib_64bit (KhronosGroup#2193)

Roll third_party/googletest/ dcc92d0ab..0eea2e9fc (16 commits)

google/googletest@dcc92d0...0eea2e9

$ git log dcc92d0ab..0eea2e9fc --date=short --no-merges --format='%ad %ae %s'
2020-04-30 absl-team Googletest export
2020-04-28 absl-team Googletest export
2020-04-27 absl-team Googletest export
2020-04-24 absl-team Googletest export
2020-04-23 absl-team Googletest export
2020-04-20 absl-team Googletest export
2020-04-20 absl-team Googletest export
2020-04-17 absl-team Googletest export
2020-03-28 arthur.j.odwyer Add -Wdeprecated to the build configuration.
2020-04-16 arthur.j.odwyer Fix a -Wdeprecated warning.
2020-04-16 arthur.j.odwyer Fix a -Wdeprecated warning.
2020-04-16 arthur.j.odwyer Fix a -Wdeprecated warning.
2020-04-16 arthur.j.odwyer Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_.
2020-04-19 igor.n.nazarenko Enable protobuf printing for open-source proto messages.
2020-04-16 arthur.j.odwyer VariadicMatcher needs a non-defaulted move constructor for compile-time performance.
2020-04-05 jijyunneng Remove duplicate codes existed in get-nprocessors.sh

Roll third_party/re2/ 209319c1b..8aef3d19d (1 commit)

google/re2@209319c...8aef3d1

$ git log 209319c1b..8aef3d19d --date=short --no-merges --format='%ad %ae %s'
2020-05-02 junyer `^' is a caret, not a carat.

Roll third_party/spirv-cross/ 7e0295abf..92f7d36c7 (2 commits)

KhronosGroup/SPIRV-Cross@7e0295a...92f7d36

$ git log 7e0295abf..92f7d36c7 --date=short --no-merges --format='%ad %ae %s'
2020-04-30 post MSL: Redirect member indices when buffer has been sorted by Offset.
2020-04-30 cwallez Fix -Wmicrosoft-enum-value

Roll third_party/spirv-tools/ d0a8719..2e1d208 (4 commits)

KhronosGroup/SPIRV-Tools@d0a8719...2e1d208

$ git log d0a8719..2e1d208 --date=short --no-merges --format='%ad %ae %s'
2020-05-01 afdx spirv-fuzz: Do not allow adding stores to read-only pointers (KhronosGroup#3316)
2020-04-30 paulthomson reduce: increase default step limit (KhronosGroup#3327)
2020-04-30 afdx Generalize IsReadOnlyVariable() to apply to pointers (KhronosGroup#3325)
2020-04-28 stevenperron Delete nullptr in function bb list immedietly (KhronosGroup#3326)

Created with:
  roll-dep third_party/effcee third_party/glslang third_party/googletest third_party/re2 third_party/spirv-cross third_party/spirv-headers third_party/spirv-tools

Fixes KhronosGroup#1056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuzzer-found-issue A note that an issue was found using a fuzzer tool (e.g. GraphicsFuzz)
Projects
None yet
Development

No branches or pull requests

3 participants