Skip to content

Merge parseInt fast-path (PR #285) + align SYS-REQ-061/062 surrogate FRETish - #287

Merged
buger merged 2 commits into
masterfrom
fix-oss-fuzz-delete-leading-comma
Jul 27, 2026
Merged

Merge parseInt fast-path (PR #285) + align SYS-REQ-061/062 surrogate FRETish#287
buger merged 2 commits into
masterfrom
fix-oss-fuzz-delete-leading-comma

Conversation

@buger

@buger buger commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Post-merge follow-up to #283.

Changes

  • parseInt fast-path (from PR Improve parseInt throughput for short numbers #285 by @trevorprater): routes ≤18-digit numbers through direct int64 accumulation (22–37% faster on short integers). MC/DC witness added for the slow-path neg branch.
  • SYS-REQ-061/062 FRETish alignment: renamed returns_error_for_missing_low_surrogatesubstitutes_replacement_for_missing_low_surrogate to match the actual U+FFFD substitution behavior (DEFECT-260727-SNGT fix) and encoding/json oracle. MC/DC witnesses updated.

Verification

  • go test ./... -count=1 -race passes
  • proof audit --scope full → 0 errors / 0 warnings
buger added 2 commits July 27, 2026 15:13
…g fixes, performance

Final state of the comprehensive proof review + bug-elimination pass.

Code fixes (6 real bugs found by the review, 5 fixed + 1 tracked):
- Empty-string key-component panic (8 sites incl. slice-expression variant
  in Set depth!=0 branch) — FIXED, DEFECT-260726-QS2V / KI-1
- Set array-index-beyond-length data loss on scalar arrays — FIXED,
  DEFECT-260727-WWWY
- ArrayEach non-array-root spurious callback — FIXED, DEFECT-260727-ARR1
- Delete trailing-comma malformation (whitespace+comma) — FIXED,
  DEFECT-260726-3PSJ
- Cross-type Set corruption (array-index under object parent) — FIXED
  via auto-coerce, DEFECT-260726-MFPA / KI-3
- Unescape lone-surrogate mishandling (synthesizes bogus non-BMP) — FIXED,
  DEFECT-260727-SNGT
- ParseInt('-') false-success — tracked KI-2 (low)
- Set top-level array beyond-length returns error — tracked KI-4 (medium)

Fuzzing infrastructure:
- Structure-aware JSON fuzzer (grammar generator + 11 JSON-aware
  mutations + 9 correctness gates) — now extracted to
  github.com/probelabs/json-fuzz (public, importable)
- Path-mutation fuzzer, sequence fuzzer, encoding/json differential
- Hardened UTF coverage: raw multibyte, surrogate pairs, lone surrogates,
  invalid UTF-8, control chars, exponent extremes, DoS gates

Specs:
- 5 new SYS-REQs (110-114) covering previously-underspecified behavior
- Boundary domains on parser variables (array_index, path_component_length)
- Hazard worst-cases enumerated across all requirements
- 2 new catalog overlay classes (element_type_partition, non_array_root_no_callback)

Performance:
- stringEnd SIMD fast path (12x on no-escape strings, 4.5x end-to-end Get)

Proof posture: L3 strict, 0 errors / 0 warnings, all checks enabled.
…ETish

- bytes.go: parseInt fast path for <=18-digit numbers (from PR #285 by
  @trevorprater, 22-37% faster on short integers)
- bytes_test.go: -9223372036854775807 MC/DC witness for the slow-path
  neg branch that the fast path made unreachable for short numbers
- SYS-REQ-061/062: aligned FRETish variable with the U+FFFD substitution
  behavior (was 'returns_error_for_missing_low_surrogate', now
  'substitutes_replacement_for_missing_low_surrogate' — matches the
  actual DEFECT-260727-SNGT fix and encoding/json behavior)
- MC/DC witnesses updated to match the new variable names
- KI-2 evidence freshness re-stamped after bytes.go edit
@buger
buger merged commit 1723912 into master Jul 27, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant