Show HN: SPIRVSmith – A fuzzer to generate random, well-defined SPIR-V shaders(github.com)
github.com
Show HN: SPIRVSmith – A fuzzer to generate random, well-defined SPIR-V shaders
https://github.com/rayanht/SPIRVSmith
https://github.com/rayanht/SPIRVSmith
SPIRVSmith was heavily inspired by other language fuzzers (e.g. CSmith, YARPGen) but uses a novel technique (program reconditioning) to ensure that the random programs don't exhibit any undefined behaviour. This is crucial if we want to find bugs on different platforms since discrepancies could otherwise be caused by undeterministic execution rather than issues with the underlying platforms.
So far, SPIRVSmith has found one miscompilation bug that causes a mismatch between Vulkan and MoltenVK, one bug that causes a segfault in the NVIDIA proprietary SPIR-V compiler and two bugs in SPIRV-Cross, the cross-compiler utility for SPIR-V.