-
Notifications
You must be signed in to change notification settings - Fork 664
spirv-fuzz: TransformationAddParameter has instroduced a regression #3480
Copy link
Copy link
Closed
Description
SPIRV-Tools/source/fuzz/transformation_add_parameter.cpp
Lines 104 to 106 in fba90d6
| if (ir_context->get_def_use_mgr()->NumUsers(old_function_type) == 1) { | |
| // Adjust existing function type if it is used only by this function. | |
| old_function_type->AddOperand({SPV_OPERAND_TYPE_ID, {parameter_type_id}}); |
parameter_type_id might have been created after old_function_type. This piece of code will then make old_function_type reference id of an instruction that is defined below the old_function_type which causes a segmentation fault in the type manager.
There is a bigger concern here, though. If this behaviour is invalid, then the validator should've raised an error. If it is valid, then the type manager shouldn't have caused a segmentation fault. Either way, segfault should've never occurred.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels