runPathOp runs a single parser operation with crash-capture recovery. On panic, the crash is recorded to disk and the counter is incremented; the test continues. Returns true if the operation completed without panicking.
(target string, data, path []byte, fn func())
| 141 | // the test continues. Returns true if the operation completed without |
| 142 | // panicking. |
| 143 | func runPathOp(target string, data, path []byte, fn func()) (ok bool) { |
| 144 | defer func() { |
| 145 | if r := recover(); r != nil { |
| 146 | pathCrashCounter++ |
| 147 | recordPathCrash(target, r, debug.Stack(), data, path) |
| 148 | ok = false |
| 149 | return |
| 150 | } |
| 151 | ok = true |
| 152 | }() |
| 153 | fn() |
| 154 | return true |
| 155 | } |
| 156 | |
| 157 | // FuzzPathMutation mutates BOTH the JSON bytes and the key-path bytes, |
| 158 | // then exercises the full parser surface. This is the harness that would |
no test coverage detected