Skip to content

Conversation

rnxpyke
Copy link
Contributor

@rnxpyke rnxpyke commented Sep 16, 2025

Description

this PR adds cargo-fuzz fuzzing targets for harper parsers.
Ideally, we wouldn't just fuzz the parser, but also the linting step with the resulting tokens to cover the harper-core code.

Notice that I had to turn of lto = true in the workpace Cargo.toml, so maybe we want to figure out how fuzzing can coexist with lto before merging.

Related: #1898 #1948

Demo

Example of fuzzing run finding a crash: https://asciinema.org/a/ShdOcwthkwwn72JyGpRk9emOu

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

@rnxpyke rnxpyke force-pushed the fuzz/1898 branch 2 times, most recently from 00bb0bf to 95ca274 Compare September 16, 2025 14:16
@rnxpyke
Copy link
Contributor Author

rnxpyke commented Sep 16, 2025

hm, seems like we can use an ENV var in the fuzzing call: rust-fuzz/cargo-fuzz#384

@rnxpyke
Copy link
Contributor Author

rnxpyke commented Sep 18, 2025

@elijah-potter would be nice to know what you think about this approach

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