Skip to content

Conversation

@kripken
Copy link
Member

@kripken kripken commented Oct 29, 2025

I finally found out how to make this not horrible:

  1. We must be careful to not use randomness differently when
    the second file is provided (or else reductions can fail weirdly).
  2. Automatically fuzz the second wasm when BINARYEN_FIRST_WASM
    is provided (which means the first is to be kept fixed).
  3. Add some docs.

@kripken kripken requested a review from tlively October 29, 2025 00:03
Comment on lines 1805 to 1807
# The reduce.sh script will then do the right thing, using that as the first
# wasm, and reducing on the second one, if you replace "original.wasm" in the
# command with "second.wasm" as needed.
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean replacing "original.wasm" in the text of reduce.sh? If not, which "original.wasm" is this referring to?

It would be useful to print these instructions in the fuzzer error message that provides the reduction command.

Copy link
Member Author

Choose a reason for hiding this comment

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

"original.wasm" appears in the command that the fuzzer tells you to run. I clarified this now.

Comment on lines 1817 to 1819
# Generate a second wasm file. (For fuzzing, we may be given one, but we
# still generate it to avoid changes to random numbers later; we just
# discard it after.)
Copy link
Member

Choose a reason for hiding this comment

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

This comment doesn't quite agree with the code below, which only generates the second module when it is not given.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, yes, we only prepare to generate it. The actual generation consumes no randomness here. I clarified the text now.

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