You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running a fuzzer is a basic quality-of-implementation task for any parser that wants to be widely used. Because you have a canonical reference format, you can easily implement round-trip verification fuzzing.
// We can round-trip any valid JSON
function fuzzTargetA(payload) {
const expected = try { JSON.parse(payload) } catch { return; };
const result = jcof.decode(jcof.encode(expected));
if (!check_equivalence(expected, result)) { fail(); }
}
// We can encode anything we successfully decode, and it decodes without errors
function fuzzTargetB(payload) {
const expected = try { jcof.decode(payload) } catch { return; };
const result = jcof.decode(jcof.encode(decoded));
if (!check_equivalence(expected, result)) { fail(); }
}
The text was updated successfully, but these errors were encountered:
Running a fuzzer is a basic quality-of-implementation task for any parser that wants to be widely used. Because you have a canonical reference format, you can easily implement round-trip verification fuzzing.
The text was updated successfully, but these errors were encountered: