Skip to content

spirv-fuzz: fuzzerutil::MaybeGetZeroConstant returns 0 when the constant exists #3739

@Vasniktel

Description

@Vasniktel

This can happen if there are multiple identical types present in the module. For example:

%1 = OpTypeArray %int %10
%4 = OpConstantComposite %1 ...
%2 = OpTypeArray %int %10
%3 = OpTypeStruct %1 %1
%5 = OpConstantComposite %3 %4 %4

In this example, there exists a constant for %3. However, if we try to call fuzzerutil::MaybeGetZeroConstant, it will check if there is a constant for %2 instead of %1. There is none. Thus, the function returns 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions