mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-25 01:01:04 +00:00
spirv-fuzz: Quit fuzzer pass when no types are available (#4409)
The fuzzer pass that adds global variables requires some basic types. This change makes the fuzzer pass exit gracefully when none are available. Fixes #4408.
This commit is contained in:
parent
4bcd13ff13
commit
c9e094cc4d
@ -47,6 +47,10 @@ void FuzzerPassAddGlobalVariables::Apply() {
|
|||||||
|
|
||||||
// These are the basic types that are available to this fuzzer pass.
|
// These are the basic types that are available to this fuzzer pass.
|
||||||
auto& basic_types = basic_type_ids_and_pointers.first;
|
auto& basic_types = basic_type_ids_and_pointers.first;
|
||||||
|
if (basic_types.empty()) {
|
||||||
|
// There are no basic types, so there is nothing this fuzzer pass can do.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// These are the pointers to those basic types that are *initially* available
|
// These are the pointers to those basic types that are *initially* available
|
||||||
// to the fuzzer pass. The fuzzer pass might add pointer types in cases where
|
// to the fuzzer pass. The fuzzer pass might add pointer types in cases where
|
||||||
|
Loading…
Reference in New Issue
Block a user