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
Recurrence of recursive mutator bug #34
Comments
ah, that’s too bad :( I will have another look at it tonight. Recursive mutators are definitely the trickiest ones to write, so I am not surprised that there are some problems with them, but it’s disappointing nonetheless 😞 |
I am on my phone and can’t look properly into it, but a potential problem might come from the usage of MapMutator. Since you’re removing some characters from the strings, you should be modifying their complexity as well. Admittedly the API and documentation for this is not good. I’ll give more details on this later again :) |
I think this was the issue; I wrote some code to compute the complexity of Apologies for the incorrect bug report. |
Unfortunately although writing a manual implementation has solved the problem, I still get the issue if I remove the manual complexity computation code (even after removing the code to strip from strings) - this branch should work I think, but doesn't https://git.sr.ht/~teymour/fuzzcheck_generators/tree/e2aebbcbf8389125b9345a2aa5767a8d3f8682fb/item/fuzzcheck_serde_json_generator/ (sorry about my confusion on this). |
No worries at all :-) The bug comes from when an Object {
inner: [
(
"",
Array {
inner: [],
},
),
(
"",
Number {
inner: 12359031397468760889,
},
),
(
"",
Null,
),
],
}
complexity = 78.0 gets mapped to: Object({
"": Null,
})
complexity = 78.0 // <--- wrong! |
The problem, I think, is that when I first wrote Now I have made fuzzcheck a lot stricter about this, and it is too easy to create a |
Unfortunately I think that #31 is still here: I tried writing a recursive JSON generator recently, but this crashes pretty quickly after being launched. I thought this might be because I modify the fuzzcheck generated types before converting them to the serde_json::Value enum (stripping invalid characters from the strings), but I removed that code and it didn't seem to fix the problem. The code is at https://git.sr.ht/~teymour/fuzzcheck_generators/tree/ (in
fuzzcheck_serde_json_generator
), and I get this error output (using the latest commit in the fuzzcheck repository)The text was updated successfully, but these errors were encountered: