Skip to content

Commit

Permalink
Update the fuzz dictionaries.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvl committed Jul 25, 2024
1 parent eeb8e13 commit 3a38104
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
6 changes: 5 additions & 1 deletion FuzzTesting/FuzzAsyncMessageSequence.dict
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To generate the data set.
# FuzzTesting/make_FuzzBinary_dict Protos/fuzz_testing.proto
# FuzzTesting/make_FuzzBinary_dict Protos/SwiftProtobufTests/fuzz_testing.proto
# Yes, this is the same as FuzzBinary.dict to help guide the contents of the
# messages.

Expand Down Expand Up @@ -304,6 +304,10 @@
"\xaa\x20"
"\xc2\x25"
"\xca\x25"
"\xca\xdf\xf3\x05"
"\x52"
"\x82\x99\xe3\x0f"
"\xa0\x01"
"\xc8\x3e"
"\xd0\x3e"
"\xd8\x3e"
Expand Down
6 changes: 5 additions & 1 deletion FuzzTesting/FuzzBinary.dict
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To generate the data set.
# FuzzTesting/make_FuzzBinary_dict Protos/fuzz_testing.proto
# FuzzTesting/make_FuzzBinary_dict Protos/SwiftProtobufTests/fuzz_testing.proto

# Tags for all the fields
"\x51"
Expand Down Expand Up @@ -302,6 +302,10 @@
"\xaa\x20"
"\xc2\x25"
"\xca\x25"
"\xca\xdf\xf3\x05"
"\x52"
"\x82\x99\xe3\x0f"
"\xa0\x01"
"\xc8\x3e"
"\xd0\x3e"
"\xd8\x3e"
Expand Down
6 changes: 5 additions & 1 deletion FuzzTesting/FuzzBinaryDelimited.dict
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To generate the data set.
# FuzzTesting/make_FuzzBinary_dict Protos/fuzz_testing.proto
# FuzzTesting/make_FuzzBinary_dict Protos/SwiftProtobufTests/fuzz_testing.proto
# Yes, this is the same as FuzzBinary.dict to help guide the contents of the
# messages.

Expand Down Expand Up @@ -304,6 +304,10 @@
"\xaa\x20"
"\xc2\x25"
"\xca\x25"
"\xca\xdf\xf3\x05"
"\x52"
"\x82\x99\xe3\x0f"
"\xa0\x01"
"\xc8\x3e"
"\xd0\x3e"
"\xd8\x3e"
Expand Down
8 changes: 6 additions & 2 deletions FuzzTesting/FuzzJSON.dict
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# To generate the descriptor set.
# ../protobuf/src/protoc -o ~/fuzz.bin -I Protos Protos/fuzz_testing.proto
# ../protobuf/bazel-bin/protoc -o ~/fuzz.bin -I Protos -I Protos/upstream \
# SwiftProtobufTests/fuzz_testing.proto

# Collect the json_names and make them keys:
# cat ~/fuzz.bin \
# | ../protobuf/src/protoc \
# | ../protobuf/bazel-bin/protoc \
# --decode=google.protobuf.FileDescriptorSet \
# -I ../protobuf/src \
# ../protobuf/src/google/protobuf/descriptor.proto \
# | sed -n -E 's/ *json_name: "(.*)"/"\\"\1\\":"/p' \
# | sort -u
"\"aString\":"
"\"anInt32\":"
"\"groupField\":"
"\"key\":"
"\"mapBoolAnEnum\":"
Expand Down Expand Up @@ -198,6 +201,7 @@
"\"mapUint64String\":"
"\"mapUint64Uint32\":"
"\"mapUint64Uint64\":"
"\"messageSetExtension\":"
"\"oneofBool\":"
"\"oneofBytes\":"
"\"oneofDouble\":"
Expand Down
10 changes: 7 additions & 3 deletions FuzzTesting/FuzzTextFormat.dict
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# To generate the descriptor set.
# ../protobuf/src/protoc -o ~/fuzz.bin -I Protos Protos/fuzz_testing.proto
# ../protobuf/bazel-bin/protoc -o ~/fuzz.bin -I Protos -I Protos/upstream \
# SwiftProtobufTests/fuzz_testing.proto

# Collect the json_names and make them keys:
# cat ~/fuzz.bin \
# | ../protobuf/src/protoc \
# | ../protobuf/bazel-bin/protoc \
# --decode=google.protobuf.FileDescriptorSet \
# -I ../protobuf/src \
# ../protobuf/src/google/protobuf/descriptor.proto \
# | sed -n -E 's/^ *name: "(.*_.*)"/"\1:"/p' \
# | grep -v "fuzz_testing.proto" \
# | sort -u
"RepeatedGroup_ext:"
"SingularGroup_ext:"
"fuzz_testing.proto:"
"a_string:"
"an_int32:"
"group_field:"
"map_bool_AnEnum:"
"map_bool_Message:"
Expand Down Expand Up @@ -200,6 +203,7 @@
"map_uint64_string:"
"map_uint64_uint32:"
"map_uint64_uint64:"
"message_set_extension:"
"oneof_bool:"
"oneof_bytes:"
"oneof_double:"
Expand Down

0 comments on commit 3a38104

Please sign in to comment.