Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuzzgen: Add SIMD instructions supported by the interpreter #5971

Merged
merged 12 commits into from
Mar 11, 2023

Conversation

afonso360
Copy link
Contributor

👋 Hey,

This PR adds all SIMD instructions currently supported by the interpreter to the fuzzer. There is a surprising amount of missing coverage even with all of these ones (i.e. lots of work to do in the interpreter)!

I've also had to disable aligned loads/stores for > 8 bytes. It's really hard to do this without support from cranelift, and I think its probably best to go add support for that before re-enabling it here.

I gave this a bunch of fuzzing time, and it has stopped crashing on all arches. S390X was a little bit harder since I was only able to test it on QEMU and its quite a bit slower than native hardware though it ran about 12hours on 8 cores without crashing, so ¯\_(ツ)_/¯.

@afonso360 afonso360 added the fuzzing Issues related to our fuzzing infrastructure label Mar 9, 2023
@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Mar 9, 2023
@github-actions
Copy link

github-actions bot commented Mar 9, 2023

Subscribe to Label Action

cc @fitzgen

This issue or pull request has been labeled: "cranelift", "fuzzing"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: fuzzing

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Contributor

@jameysharp jameysharp left a comment

Choose a reason for hiding this comment

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

Hooray! Looks good overall. I just have a few small requests.

cranelift/fuzzgen/src/function_generator.rs Show resolved Hide resolved
cranelift/fuzzgen/src/function_generator.rs Outdated Show resolved Hide resolved
cranelift/fuzzgen/src/function_generator.rs Outdated Show resolved Hide resolved
Co-Authored-By: Jamey Sharp <jsharp@fastly.com>
Co-Authored-By: Jamey Sharp <jsharp@fastly.com>
@afonso360 afonso360 added this pull request to the merge queue Mar 11, 2023
Merged via the queue into bytecodealliance:main with commit 2386eee Mar 11, 2023
@afonso360 afonso360 deleted the fuzz-full-simd branch March 11, 2023 12:58
afonso360 added a commit to afonso360/wasmtime that referenced this pull request Mar 13, 2023
…alliance#5971)

* fuzzgen: Add some SIMD instructions

* fuzzgen: Remove `scalar_to_vector`

Broken in the interpreter bytecodealliance#5911

* fuzzgen: Remove SIMD bitcasts

Broken in the interpreter bytecodealliance#5915

* fuzzgen: Fix insert lane

* fuzzgen: Remove debug code

* fuzzgen: Remove vall_true

This is broken in the interpreter bytecodealliance#5916

* fuzzgen: Disable a few more ops

* fuzzgen: Remove `iadd_pairwise.i64x2`

Turns out it doesen't exist

* fuzzgen: Remove scalar `sqmul_round_sat`

bytecodealliance#5923

* fuzzgen: Disable aligned loads to SIMD values

* fuzzgen: Address Review Feedback

Co-Authored-By: Jamey Sharp <jsharp@fastly.com>

* fuzzgen: Rework `cmp` exclusion rules

Co-Authored-By: Jamey Sharp <jsharp@fastly.com>

---------

Co-authored-by: Jamey Sharp <jsharp@fastly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator fuzzing Issues related to our fuzzing infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants