splitPathComponents interprets the fuzz path bytes as a '/'-separated list of key components. Empty segments (from "", "a/", "/a", "a//b", etc.) become "" key components — the input shape that exposes the empty-key hazard class (8th panic site + the still-open parser.go:981 site documented as D9 in
(path []byte)
| 117 | // multi-component paths with empty segments are reachable). Any byte |
| 118 | // value would work; '/' is a human-readable default. |
| 119 | func splitPathComponents(path []byte) []string { |
| 120 | s := string(path) |
| 121 | if len(s) == 0 { |
| 122 | // Empty path bytes → empty-string key component (single). This is |
| 123 | // distinct from "no keys" (which means "return the root"); the |
| 124 | // empty-string component exercises the `keys[0] == ""` hazard. |
| 125 | return []string{""} |
| 126 | } |
| 127 | if !strings.Contains(s, "/") { |
| 128 | return []string{s} |
| 129 | } |
| 130 | return strings.Split(s, "/") |
| 131 | } |
| 132 | |
| 133 | // pathCrashCounter lets the test report how many crashes the fuzzer |
| 134 | // recorded during a run. Incremented atomically-free (the fuzz worker is |
no outgoing calls
no test coverage detected