|
|
|
@ -588,7 +588,7 @@ TEST(MessageTest, Freeze) { |
|
|
|
|
//
|
|
|
|
|
// static void DecodeEncodeArbitrarySchemaAndPayload(
|
|
|
|
|
// const upb::fuzz::MiniTableFuzzInput& input, std::string_view proto_payload,
|
|
|
|
|
// int decode_options, int encode_options, bool length_delimited = false) {
|
|
|
|
|
// int decode_options, int encode_options, bool length_prefixed = false) {
|
|
|
|
|
// // Lexan does not have setenv
|
|
|
|
|
// #ifndef _MSC_VER
|
|
|
|
|
// setenv("FUZZTEST_STACK_LIMIT", "262144", 1);
|
|
|
|
@ -605,9 +605,9 @@ TEST(MessageTest, Freeze) { |
|
|
|
|
// upb::fuzz::BuildMiniTable(input, &exts, arena.ptr());
|
|
|
|
|
// if (!mini_table) return;
|
|
|
|
|
// upb_Message* msg = upb_Message_New(mini_table, arena.ptr());
|
|
|
|
|
// if (length_delimited) {
|
|
|
|
|
// if (length_prefixed) {
|
|
|
|
|
// size_t num_bytes_read = 0;
|
|
|
|
|
// upb_DecodeStatus status = upb_DecodeLengthDelimited(
|
|
|
|
|
// upb_DecodeStatus status = upb_DecodeLengthPrefixed(
|
|
|
|
|
// proto_payload.data(), proto_payload.size(), msg, &num_bytes_read,
|
|
|
|
|
// mini_table, exts, decode_options, arena.ptr());
|
|
|
|
|
// ASSERT_TRUE(status != kUpb_DecodeStatus_Ok ||
|
|
|
|
@ -618,9 +618,9 @@ TEST(MessageTest, Freeze) { |
|
|
|
|
// }
|
|
|
|
|
// char* ptr;
|
|
|
|
|
// size_t size;
|
|
|
|
|
// if (length_delimited) {
|
|
|
|
|
// upb_EncodeLengthDelimited(msg, mini_table, encode_options, arena.ptr(),
|
|
|
|
|
// &ptr, &size);
|
|
|
|
|
// if (length_prefixed) {
|
|
|
|
|
// upb_EncodeLengthPrefixed(msg, mini_table, encode_options, arena.ptr(), &ptr,
|
|
|
|
|
// &size);
|
|
|
|
|
// } else {
|
|
|
|
|
// upb_Encode(msg, mini_table, encode_options, arena.ptr(), &ptr, &size);
|
|
|
|
|
// }
|
|
|
|
|