-
Notifications
You must be signed in to change notification settings - Fork 664
spirv-fuzz: Invalidation when indexing into a structure #3671
Copy link
Copy link
Closed
Labels
component:fuzzerRelates to the spirv-fuzz toolRelates to the spirv-fuzz tool
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component:fuzzerRelates to the spirv-fuzz toolRelates to the spirv-fuzz tool