aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fuzz/corpus/jsonval
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-19 22:49:46 +0200
committeruser <user@clank>2026-08-19 22:49:57 +0200
commit9c06e643cf5b8fe735b8088aef9ea686087e2997 (patch)
tree6896d20a827f0e453507cb10bd95c25594ce8209 /tests/fuzz/corpus/jsonval
parentparsers: fix seven bugs found by fuzzing (diff)
downloadslosh-9c06e643cf5b8fe735b8088aef9ea686087e2997.tar.gz
slosh-9c06e643cf5b8fe735b8088aef9ea686087e2997.tar.xz
slosh-9c06e643cf5b8fe735b8088aef9ea686087e2997.zip
fuzz: libFuzzer harness for all six parser surfaces
Targets: kdl, jsonval, expr, proto, osc5577, input — each compiled standalone against its own .c with ASan + UBSan, no vendor deps. Includes seed corpora from shipped configs/themes/chrome, real control API lines, terminal escape sequences, and regression inputs from the bugs already fixed. standalone_main.c replays files without the fuzzer runtime for debugging and CI. Top-level: make fuzz (run all, TIME=15 default), make fuzz-corpus (replay seeds only, fast CI gate).
Diffstat (limited to 'tests/fuzz/corpus/jsonval')
-rw-r--r--tests/fuzz/corpus/jsonval/quit.json1
-rw-r--r--tests/fuzz/corpus/jsonval/regress_overflow_cast1
-rw-r--r--tests/fuzz/corpus/jsonval/regress_truncated_u1
-rw-r--r--tests/fuzz/corpus/jsonval/shapes.json1
-rw-r--r--tests/fuzz/corpus/jsonval/snapshot.json1
-rw-r--r--tests/fuzz/corpus/jsonval/unicode.json1
6 files changed, 6 insertions, 0 deletions
diff --git a/tests/fuzz/corpus/jsonval/quit.json b/tests/fuzz/corpus/jsonval/quit.json
new file mode 100644
index 0000000..5ff6678
--- /dev/null
+++ b/tests/fuzz/corpus/jsonval/quit.json
@@ -0,0 +1 @@
+{"cmd":"quit"} \ No newline at end of file
diff --git a/tests/fuzz/corpus/jsonval/regress_overflow_cast b/tests/fuzz/corpus/jsonval/regress_overflow_cast
new file mode 100644
index 0000000..b9d7a6d
--- /dev/null
+++ b/tests/fuzz/corpus/jsonval/regress_overflow_cast
@@ -0,0 +1 @@
+2e22 \ No newline at end of file
diff --git a/tests/fuzz/corpus/jsonval/regress_truncated_u b/tests/fuzz/corpus/jsonval/regress_truncated_u
new file mode 100644
index 0000000..d062943
--- /dev/null
+++ b/tests/fuzz/corpus/jsonval/regress_truncated_u
@@ -0,0 +1 @@
+"\u \ No newline at end of file
diff --git a/tests/fuzz/corpus/jsonval/shapes.json b/tests/fuzz/corpus/jsonval/shapes.json
new file mode 100644
index 0000000..f8e46e9
--- /dev/null
+++ b/tests/fuzz/corpus/jsonval/shapes.json
@@ -0,0 +1 @@
+{"a":[1,2.5,-3e10,true,false,null,"s\n\"q\""],"o":{"nested":{"deep":[{}]}},"dup":1,"dup":2} \ No newline at end of file
diff --git a/tests/fuzz/corpus/jsonval/snapshot.json b/tests/fuzz/corpus/jsonval/snapshot.json
new file mode 100644
index 0000000..67642cd
--- /dev/null
+++ b/tests/fuzz/corpus/jsonval/snapshot.json
@@ -0,0 +1 @@
+{"cmd":"snapshot","format":"json"} \ No newline at end of file
diff --git a/tests/fuzz/corpus/jsonval/unicode.json b/tests/fuzz/corpus/jsonval/unicode.json
new file mode 100644
index 0000000..7eb4ca7
--- /dev/null
+++ b/tests/fuzz/corpus/jsonval/unicode.json
@@ -0,0 +1 @@
+{"l": "\u25c4", "r": "\u25ba", "t": "\u25b2", "b": "\u25bc"} \ No newline at end of file