Skip to content

spirv-fuzz: Add fuzzer pass to perform module donation#3117

Merged
afd merged 2 commits intoKhronosGroup:masterfrom
afd:real-donate-module
Jan 7, 2020
Merged

spirv-fuzz: Add fuzzer pass to perform module donation#3117
afd merged 2 commits intoKhronosGroup:masterfrom
afd:real-donate-module

Conversation

@afd
Copy link
Copy Markdown
Contributor

@afd afd commented Dec 20, 2019

This change adds a fuzzer pass that allows code from other SPIR-V
modules to be donated into the module under transformation. It also
changes the command-line options of the tools so that, in fuzzing
mode, a file must be specified that contains the names of available
donor modules.

Copy link
Copy Markdown
Contributor

@paulthomson paulthomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with comments

// Scan through the function, remapping each result id that it generates to
// a fresh id. This is necessary because functions include forward
// references, e.g. to labels.
function_to_donate->ForEachInst([this, &original_id_to_donated_id](
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we just use a for loop here? And below too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iterating over a function yields its basic blocks. We want to go through every instruction involved in a function, including OpFunction, OpParameter, etc. It does not seem that there is a suitable iterator in Function's interface to allow this to be achieved via a for loop.

afd added 2 commits January 6, 2020 22:31
This change adds a fuzzer pass that allows code from other SPIR-V
modules to be donated into the module under transformation.  It also
changes the command-line options of the tools so that, in fuzzing
mode, a file must be specified that contains the names of available
donor modules.
@afd afd force-pushed the real-donate-module branch from 33876ac to 76c749e Compare January 6, 2020 22:57
@afd afd merged commit 31acc78 into KhronosGroup:master Jan 7, 2020
@afd afd deleted the real-donate-module branch January 7, 2020 08:39
dneto0 pushed a commit to dneto0/SPIRV-Tools that referenced this pull request Sep 14, 2024
Roll third_party/glslang/ 40801e3..d203754 (6 commits)

KhronosGroup/glslang@40801e3...d203754

$ git log 40801e3..d203754 --date=short --no-merges --format='%ad %ae %s'
2020-01-07 cepheus Fix KhronosGroup#1829: Add "--" command-line options for macro def/undef.
2020-01-08 laddoc Move symbol builtin check to grammar stage
2020-01-06 lryer Add missing extension defination
2019-11-26 laddoc Add support for ARB_gpu_shader_fp64
2020-01-03 lryer Fix glslang can't link multiple AST in a single stage
2019-12-25 laddoc Modify atomic_uint binding check

Roll third_party/googletest/ 306f3754a..d854bd6ac (4 commits)

google/googletest@306f375...d854bd6

$ git log 306f3754a..d854bd6ac --date=short --no-merges --format='%ad %ae %s'
2020-01-09 absl-team Googletest export
2020-01-09 absl-team Googletest export
2020-01-07 absl-team Googletest export
2020-01-07 absl-team Googletest export

Roll third_party/re2/ 00af5b44d..85c014206 (2 commits)

google/re2@00af5b4...85c0142

$ git log 00af5b44d..85c014206 --date=short --no-merges --format='%ad %ae %s'
2020-01-12 junyer Tidy up a test.
2020-01-07 junyer Prevent ShortVisit() from crashing fuzzers.

Roll third_party/spirv-cross/ 961b9014a..172e39f03 (14 commits)

KhronosGroup/SPIRV-Cross@961b901...172e39f

$ git log 961b9014a..172e39f03 --date=short --no-merges --format='%ad %ae %s'
2020-01-09 post HLSL: Add a resource remapping API similar to MSL.
2020-01-09 post MSL: Deal with sign on wave min/max.
2020-01-09 post HLSL: Deal with casting for WaveActiveMin/Max.
2020-01-09 post GLSL: Deal with sign in subgroup Min/Max operations.
2020-01-08 post Run format_all.sh.
2020-01-08 post HLSL: Fix bug when reading and writing structs from SSBO.
2020-01-08 post HLSL: Implement stores for complex composites in ByteAddressBuffers.
2020-01-08 post HLSL: Support loading complex composites from ByteAddressBuffer.
2020-01-08 post Run format_all.sh.
2020-01-07 post MSL: Deal with padded fragment output + Component decoration.
2020-01-07 post MSL: Explicitly don't support component packing for tessellation.
2020-01-07 post MSL: Don't set OrigID when emitting component packed vectors.
2020-01-07 post MSL: Deal with packing vectors for vertex input/fragment output.
2020-01-07 post MSL: Add trivial tests for Component decoration.

Roll third_party/spirv-tools/ c8bf143..18b3b94 (6 commits)

KhronosGroup/SPIRV-Tools@c8bf143...18b3b94

$ git log c8bf143..18b3b94 --date=short --no-merges --format='%ad %ae %s'
2020-01-10 33791085+aqnuep Remove names and decorations of imported symbols (KhronosGroup#3081)
2020-01-08 dneto Fix GN build for OpenCL.DebugInfo.100 update (KhronosGroup#3134)
2020-01-08 bclayton Fix bad parameter names in error message (KhronosGroup#3129)
2020-01-07 alanbaker Revert PR KhronosGroup#3093 (KhronosGroup#3131)
2020-01-07 alanbaker Disallow forward references in arrays (KhronosGroup#3093)
2020-01-07 afdx spirv-fuzz: Add fuzzer pass to perform module donation (KhronosGroup#3117)

Created with:
  roll-dep third_party/effcee third_party/glslang third_party/googletest third_party/re2 third_party/spirv-cross third_party/spirv-headers third_party/spirv-tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants