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
spirv-val invalidated a fuzzed shader because the result id of an OpConstantNull instruction was being used to index into a structure. According to SPIR-V specification, when indexing into a structure, each index must be the result id of an OpConstant instruction.
error: line 79: The <id> passed to OpInBoundsAccessChain to index into a structure must be an OpConstant.
%399 = OpConstantNull %uint
Debugging spirv-fuzz, I found that TransformationReplaceIdWithSynonym checks only if the index instruction is OpAccessChain, while the same is true for OpInBoundsAccessChain and OpPtrAccessChain.
The text was updated successfully, but these errors were encountered:
TransformationReplaceIdWithSynonym is careful to avoid replacing id uses that index into a struct with synonyms because the indices must only be OpConstant instructions. However, the check only considered OpAccessChain instructions, even though the same restriction applies to OpInBoundsAccessChain, OpPtrAccessChain, etc.
`TransformationReplaceIdWithSynonym` is careful to avoid replacing id uses that index into a struct with synonyms because the indices must only be `OpConstant` instructions. However, the check only considered `OpAccessChain` instructions, even though the same restriction applies to `OpInBoundsAccessChain`, `OpPtrAccessChain`, etc.
This change extends the check to include all access chain instructions.
Fixes#3671.
dnovillo
pushed a commit
to dnovillo/SPIRV-Tools
that referenced
this issue
Aug 19, 2020
…up#3672)
`TransformationReplaceIdWithSynonym` is careful to avoid replacing id uses that index into a struct with synonyms because the indices must only be `OpConstant` instructions. However, the check only considered `OpAccessChain` instructions, even though the same restriction applies to `OpInBoundsAccessChain`, `OpPtrAccessChain`, etc.
This change extends the check to include all access chain instructions.
FixesKhronosGroup#3671.
spirv-val
invalidated a fuzzed shader because the result id of anOpConstantNull
instruction was being used to index into a structure. According to SPIR-V specification, when indexing into a structure, each index must be the result id of anOpConstant
instruction.Debugging
spirv-fuzz
, I found thatTransformationReplaceIdWithSynonym
checks only if the index instruction isOpAccessChain
, while the same is true forOpInBoundsAccessChain
andOpPtrAccessChain
.The text was updated successfully, but these errors were encountered: