-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Minify crashes while fuzz works #28
Comments
Hi! Thanks for including a link to the code. I am trying to reproduce it but found this compile-time error:
I couldn't find the file Regarding the bug itself, it seems like fuzzcheck thinks that the input doesn't cause any crash. Have you verified that it fails the test reliably? That being said, I wouldn't be surprised if there is a bug in fuzzcheck itself, the |
Hi oops seems i forgot that file.
The error I had was "double free or corruption (out)". However I am not entirely sure if thats a bug in the code I was fuzzing or something in between fuzzcheck and the code. (As for rust code this is a quite unusual error I think). The verification test I now did doesnt seem to fail (using the same harness but outside of fuzzcheck). So this error may have happened in fuzzcheck or due to the way fuzzcheck works. So that may explain why minify might not work 🤔 |
Thanks, I can compile the code and reproduce it now :) I have added an option to I have also added a way to look into the details of each test failure (they will be written to
But none of them are reproducible by using the verification test. Fuzz tests that perform IO operations unfortunately come with a lot of drawbacks: each iteration is very slow and the failures may not be reproducible. I have honestly not given them much thought when writing fuzzcheck, as it was originally meant as a fuzzer for pure functions whose behaviour doesn't change at all between different executions. Also note that the fuzz test which gave these panic messages was done on my computer using the latest (unpublished) version of fuzzcheck. It may be that there really was a bug in fuzzcheck 0.10.1 but that it was fixed in the meantime. How did you find that the error was “double free or corruption (out)”? And do you think there is a way to get a backtrace or some other debug information right when it happens? Finally, let me know if you managed to find more information about why these errors happen, where the double-free happens, or whether you managed to make everything work. Then, if you decide to go ahead, I can also help you make the best use of fuzzcheck :) For example, one thing I noticed in the conduit fuzzer is that the coverage information from the actual tested crate is not observed by fuzzcheck, because it defaults to observing only the top-level crate. This should be better emphasised in the documentation. |
I expected that :) But hoped it wouldnt be too bad and to be honest the resets between runs are honestly quite hacky anyway from my side :) Thanks for looking into this though :)
The message was logged between the coverage logging and then it locked up entirely it seemed. I can check later this week. Currently I am ill so I am not spending too much time at my PC :)
Yeah thats mostly due to the fact that conduit (the tested crate) relies on an crate by the name "ruma" for its types. And that is a quite huge sdk for the matrix protocol. It currently is missing the derive annotations and we probably want to wait to have pattern based string mutators too. So it is kinda blocked behind #6 I think. As putting this into the conduit crate itself currently would cause quite a lot of code duplication for proper fuzzing. This currently is more in the POC phase (The endpoint tested for example is not really the best to fuzz, there are more viable ones in the proto :) ). So there is certainly a lot to improve for sure :D |
No worries :) It is true that it is probably a bit too early to fuzz a large crate with lots of strings such as I am still thinking about pattern-based string mutators. It is a tough problem to solve in the case where a single string can be interpreted in an exponential number of ways by a single pattern (e.g. for the regex I hope you get well soon! Have a nice day 😊 |
We mostly have to cover things like And thanks :) have a great day too. Thanks for all the help with this :) |
Hi I am trying to use my fuzz harness and had a crash which I would like to minify.
Code is at https://gitlab.com/MTRNord/conduit-fuzz-harness/-/tree/03cade7d643a6cf28ba93c966ae77f5cec82c1a8 (Note there is a file reference in the cargo toml. the rev and url in there however should work though)
The setup is a little funky tbh as I had link failures when trying to do the verification tests so the cfg flags are all over the place. It however compiles just fine (expect ~10-20m compile times due to the upstream package
conduit
that I am fuzzing. Its annoying but it is due to codegen sadly.)Running it with
cargo fuzzcheck tests::register --command minify --input-file "fuzz/tests::register/artifacts/35056055153a44e5.json"
fails with the following for me:The json file I input is:
I am not sure why this may be happening. any tips would help.
The text was updated successfully, but these errors were encountered: