You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Joshua Haberman
6e1cbdfe09
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
...
The initial motivation for this change was to fix a bug found by fuzzing. The old fuzz test (built on `cc_fuzz_target()`) detected an infinite loop if a bytes field default has an unterminated `\x` escape.
To fix this bug while expanding fuzz coverage, I created a fuzz test that verifies that we can do a lossless round trip from descriptor -> DefPool -> descriptor. We use C++ as the source of truth for whether a descriptor is valid or not, and what the canonical serialization back to protobuf form should be.
I wrote the new fuzz test using go/FuzzTest, which makes it easier and more readable to use an arbitrary `FileDescriptorSet` as input, while adding test cases for regressions.
The fuzz test highlighted a handful of errors that I subsequently fixed and added regression tests for:
1. The aforementioned unterminated `\x` bug.
2. We were not propagating the `edition` field.
3. We were missing the CheckIdent() check in a few places.
4. We were rejecting files with empty name, whereas C++ allows this.
5. There were a few bugs with escaping string defaults.
Since FuzzTest is Clang-only, I split the `FUZZ_TEST()` invocation from the regression tests, since the latter are portable and should be run on all platforms. Only `FUZZ_TEST()` itself is in a google3/Clang-only file.
PiperOrigin-RevId: 506997362
2 years ago
..
stage0/google/ protobuf
Roll-forward of: Add retention and target attributes to descriptor.proto
2 years ago
common.h
upb is self-hosting!
2 years ago
def.h
…
def.hpp
upb is self-hosting!
2 years ago
def_builder.c
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
2 years ago
def_builder_internal.h
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
2 years ago
def_builder_test.cc
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
2 years ago
def_pool.c
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
2 years ago
def_pool.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
def_pool_internal.h
upb is self-hosting!
2 years ago
def_type.c
…
def_type.h
create upb/hash/
2 years ago
desc_state.c
…
desc_state_internal.h
clean up the :mini_table build target
2 years ago
enum_def.c
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
2 years ago
enum_def.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
enum_def_internal.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
enum_reserved_range.c
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
enum_reserved_range.h
Internal Change.
2 years ago
enum_reserved_range_internal.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
enum_value_def.c
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
enum_value_def.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
enum_value_def_internal.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
extension_range.c
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
extension_range.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
extension_range_internal.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
field_def.c
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
2 years ago
field_def.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
field_def_internal.h
split apart constructors for extensions vs non-extensions
2 years ago
file_def.c
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
2 years ago
file_def.h
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
2 years ago
file_def_internal.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
message.c
Unified accessor for WhichOneof().
2 years ago
message.h
update PHP and Ruby to use the new accessors, delete the old ones
2 years ago
message.hpp
…
message_def.c
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
2 years ago
message_def.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
message_def_internal.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
message_reserved_range.c
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
message_reserved_range.h
Internal Change.
2 years ago
message_reserved_range_internal.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
method_def.c
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
method_def.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
method_def_internal.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
oneof_def.c
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
oneof_def.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
oneof_def_internal.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
service_def.c
Added fuzzer for descriptor parsing/serialization, and fixed several bugs.
2 years ago
service_def.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago
service_def_internal.h
Added UPB_DESC() macro for all bootstrap references to proto symbols.
2 years ago