-
Notifications
You must be signed in to change notification settings - Fork 664
spirv-fuzz: Back up pointer, write through pointer, restore #3624
Copy link
Copy link
Closed
Labels
component:fuzzerRelates to the spirv-fuzz toolRelates to the spirv-fuzz tool
Description
Add a transformation (and associated fuzzer pass) that takes:
- An existing pointer in the module
- A fresh id for a temporary result
and:
- Backs up the current value that the pointer refers to by loading from the pointer into the temporary result
- Stores an irrelevant zero to the pointer (so that another fuzzer pass can make this more interesting)
- Restores the pointer's original value from the temporary result.
E.g., if p is the existing pointer we might do:
%temporary_result = OpLoad p
OpStore %p %irrelevant_zero
OpStore %p %temporary_result
Other fuzzer passes should be encouraged to replace the irrelevant zero with something interesting, and wrap the restoring OpStore in some control flow to make it less clear that it will be executed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component:fuzzerRelates to the spirv-fuzz toolRelates to the spirv-fuzz tool