diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index ce5dd21..d3aff61 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -36,7 +36,7 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install Ninja + - name: Install Deps run: sudo apt install -y liblzma-dev ninja-build - name: Set reusable strings diff --git a/cmake/external/googletest.cmake b/cmake/external/googletest.cmake index 11d0fdf..0f9175b 100644 --- a/cmake/external/googletest.cmake +++ b/cmake/external/googletest.cmake @@ -44,7 +44,7 @@ include (ExternalProject) ExternalProject_Add(${GTEST_TARGET} PREFIX ${GTEST_TARGET} GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG v1.14.0 + GIT_TAG v1.15.0 UPDATE_COMMAND "" CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} diff --git a/cmake/external/protobuf.cmake b/cmake/external/protobuf.cmake index 7a74b9e..64ebdc6 100644 --- a/cmake/external/protobuf.cmake +++ b/cmake/external/protobuf.cmake @@ -152,7 +152,7 @@ include (ExternalProject) ExternalProject_Add(${PROTOBUF_TARGET} PREFIX ${PROTOBUF_TARGET} GIT_REPOSITORY https://github.com/google/protobuf.git - GIT_TAG v27.1 + GIT_TAG v29.3 UPDATE_COMMAND "" CONFIGURE_COMMAND ${CMAKE_COMMAND} ${PROTOBUF_INSTALL_DIR}/src/${PROTOBUF_TARGET} -G${CMAKE_GENERATOR} diff --git a/examples/libfuzzer/libfuzzer_bin_example.cc b/examples/libfuzzer/libfuzzer_bin_example.cc index 0734caa..62bb45a 100644 --- a/examples/libfuzzer/libfuzzer_bin_example.cc +++ b/examples/libfuzzer/libfuzzer_bin_example.cc @@ -55,7 +55,7 @@ DEFINE_BINARY_PROTO_FUZZER(const libfuzzer_example::Msg& message) { !std::isnan(message.optional_float()) && std::fabs(message.optional_float()) > 1000 && message.any().UnpackTo(&file) && !file.name().empty()) { - std::cerr << absl::StrCat(message) << "\n"; + std::cerr << protobuf_mutator::protobuf::ShortFormat(message) << "\n"; abort(); } } diff --git a/examples/libfuzzer/libfuzzer_example.cc b/examples/libfuzzer/libfuzzer_example.cc index 37c4e6b..a7b9ba5 100644 --- a/examples/libfuzzer/libfuzzer_example.cc +++ b/examples/libfuzzer/libfuzzer_example.cc @@ -55,7 +55,7 @@ DEFINE_PROTO_FUZZER(const libfuzzer_example::Msg& message) { !std::isnan(message.optional_float()) && std::fabs(message.optional_float()) > 1000 && message.any().UnpackTo(&file) && !file.name().empty()) { - std::cerr << absl::StrCat(message) << "\n"; + std::cerr << protobuf_mutator::protobuf::ShortFormat(message) << "\n"; abort(); } } diff --git a/src/field_instance.h b/src/field_instance.h index 8ffb745..823d19b 100644 --- a/src/field_instance.h +++ b/src/field_instance.h @@ -195,9 +195,9 @@ class ConstFieldInstance { const protobuf::FieldDescriptor* descriptor() const { return descriptor_; } std::string DebugString() const { - std::string s = absl::StrCat(*descriptor_); - if (is_repeated()) s += absl::StrCat("[", index_, "]"); - return s + " of\n" + absl::StrCat(*message_); + std::string s = descriptor_->DebugString(); + if (is_repeated()) s += "[" + std::to_string(index_) + "]"; + return s + " of\n" + protobuf::ShortFormat(*message_); } protected: diff --git a/src/mutator.cc b/src/mutator.cc index 4fdcae4..191204e 100644 --- a/src/mutator.cc +++ b/src/mutator.cc @@ -801,7 +801,7 @@ std::string Mutator::MutateUtf8String(const std::string& value, bool Mutator::IsInitialized(const Message& message) const { if (!keep_initialized_ || message.IsInitialized()) return true; - std::cerr << "Uninitialized: " << absl::StrCat(message) << "\n"; + std::cerr << "Uninitialized: " << protobuf::ShortFormat(message) << "\n"; return false; } diff --git a/src/mutator_test.cc b/src/mutator_test.cc index 25a9b8a..8cd5013 100644 --- a/src/mutator_test.cc +++ b/src/mutator_test.cc @@ -410,8 +410,8 @@ bool Mutate(const protobuf::Message& from, const protobuf::Message& to, } ADD_FAILURE() << "Failed to get from:\n" - << absl::StrCat(from) << "\nto:\n" - << absl::StrCat(to); + << protobuf::ShortFormat(from) << "\nto:\n" + << protobuf::ShortFormat(to); return false; }