Fuzz introspector: /src/inspector/source-code/src/sample_encode_fuzzer.cc
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
97 97 2 :

['google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(unsigned int, std::__1::basic_string , std::__1::allocator > const&, unsigned char*)', 'sentencepiece::SentencePieceText::_internal_text() const']

312 870 sentencepiece::SentencePieceText::_InternalSerialize(unsignedchar*,google::protobuf::io::EpsCopyOutputStream*)const call site: 00000 /src/sentencepiece/src/builtin_pb/sentencepiece.pb.cc:595
61 61 6 :

['google::protobuf::internal::WireFormatLite::EncodeFloat(float)', 'google::protobuf::internal::WireFormatLite::MakeTag(int, google::protobuf::internal::WireFormatLite::WireType)', 'google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(unsigned int, unsigned char*)', 'google::protobuf::io::EpsCopyOutputStream::EnsureSpace(unsigned char*)', 'sentencepiece::SentencePieceText::_internal_score() const', 'google::protobuf::io::CodedOutputStream::WriteLittleEndian32ToArray(unsigned int, unsigned char*)']

117 364 sentencepiece::SentencePieceText::_InternalSerialize(unsignedchar*,google::protobuf::io::EpsCopyOutputStream*)const call site: 00000 /src/sentencepiece/src/builtin_pb/sentencepiece.pb.cc:609
36 36 7 :

['google::protobuf::internal::LogMessage::operator<<(unsigned long)', 'google::protobuf::internal::LogMessage::~LogMessage()', 'google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)', 'google::protobuf::internal::LogMessage::operator<<(std::__1::basic_string , std::__1::allocator > const&)', 'google::protobuf::internal::LogMessage::operator<<(char const*)', 'google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)', 'std::__1::basic_string , std::__1::allocator >::~basic_string()']

36 36 google::protobuf::MessageLite::AppendPartialToString(std::__1::basic_string ,std::__1::allocator >*)const call site: 00000 /src/sentencepiece/third_party/protobuf-lite/message_lite.cc:456
14 14 2 :

['sentencepiece::SentencePieceText::_internal_text() const', 'google::protobuf::internal::WireFormatLite::StringSize(std::__1::basic_string , std::__1::allocator > const&)']

16 22 sentencepiece::SentencePieceText::ByteSizeLong()const call site: 00000 /src/sentencepiece/src/builtin_pb/sentencepiece.pb.cc:644
0 0 None 100 100 google::protobuf::internal::VerifyVersion(int,int,charconst*) call site: 00000 /src/sentencepiece/third_party/protobuf-lite/common.cc:74
0 0 None 0 87 sentencepiece::SentencePieceText::IsInitialized()const call site: 00000 /src/sentencepiece/src/builtin_pb/sentencepiece.pb.cc:701
0 0 None 0 0 google::protobuf::internal::(anonymousnamespace)::InitSCC_DFS(google::protobuf::internal::SCCInfoBase*) call site: 00000 /src/sentencepiece/third_party/protobuf-lite/generated_message_util.cc:737

Fuzzer calltree

0 LLVMFuzzerTestOneInput [function] [call site] 00000
1 sentencepiece::SentencePieceProcessor::SentencePieceProcessor() [function] [call site] 00001
1 sentencepiece::SentencePieceProcessor::SampleEncodeAsSerializedProto(std::__1::basic_string_view<char, std::__1::char_traits<char> >, int, float) const [function] [call site] 00002
2 sentencepiece::ImmutableSentencePieceText::ImmutableSentencePieceText() [function] [call site] 00003
3 sentencepiece::SentencePieceText::default_instance() [function] [call site] 00004
4 google::protobuf::internal::InitSCC(google::protobuf::internal::SCCInfoBase*) [function] [call site] 00005
5 google::protobuf::internal::InitSCCImpl(google::protobuf::internal::SCCInfoBase*) [function] [call site] 00006
6 google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int) [function] [call site] 00007
6 google::protobuf::internal::LogMessage::operator<<(char const*) [function] [call site] 00008
6 google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&) [function] [call site] 00009
7 google::protobuf::internal::LogMessage::Finish() [function] [call site] 00010
8 __cxa_allocate_exception [call site] 00011
8 google::protobuf::FatalException::FatalException(char const*, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [function] [call site] 00012
9 std::exception::exception[abi:ne180100]() [function] [call site] 00013
9 std::exception::~exception() [call site] 00014
8 __cxa_throw [call site] 00015
8 google::protobuf::FatalException::~FatalException() [function] [call site] 00016
9 std::exception::~exception() [call site] 00017
8 __cxa_free_exception [call site] 00018
6 google::protobuf::internal::LogMessage::~LogMessage() [function] [call site] 00019
6 google::protobuf::internal::InitProtobufDefaults() [function] [call site] 00020
7 google::protobuf::internal::InitProtobufDefaultsSlow() [function] [call site] 00021
8 __cxa_guard_acquire [call site] 00022
8 google::protobuf::internal::InitProtobufDefaultsImpl() [function] [call site] 00023
9 google::protobuf::internal::OnShutdownDestroyString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*) [function] [call site] 00024
10 google::protobuf::internal::OnShutdownRun(void (*)(void const*), void const*) [function] [call site] 00025
11 google::protobuf::internal::ShutdownData::get() [function] [call site] 00026
12 __cxa_guard_acquire [call site] 00027
12 google::protobuf::internal::ShutdownData::ShutdownData() [function] [call site] 00028
13 google::protobuf::internal::WrappedMutex::WrappedMutex() [function] [call site] 00029
12 __cxa_guard_release [call site] 00030
12 __cxa_guard_abort [call site] 00031
11 google::protobuf::internal::MutexLock::MutexLock(google::protobuf::internal::WrappedMutex*) [function] [call site] 00032
12 google::protobuf::internal::WrappedMutex::Lock() [function] [call site] 00033
11 google::protobuf::internal::MutexLock::~MutexLock() [function] [call site] 00034
12 google::protobuf::internal::WrappedMutex::Unlock() [function] [call site] 00035
12 __clang_call_terminate [call site] 00036
13 __cxa_begin_catch [call site] 00037
10 google::protobuf::internal::DestroyString(void const*) [function] [call site] 00038
8 __cxa_guard_release [call site] 00039
8 __cxa_guard_abort [call site] 00040
6 google::protobuf::internal::WrappedMutex::Lock() [function] [call site] 00041
6 google::protobuf::internal::(anonymous namespace)::InitSCC_DFS(google::protobuf::internal::SCCInfoBase*) [function] [call site] 00042
7 google::protobuf::internal::(anonymous namespace)::InitSCC_DFS(google::protobuf::internal::SCCInfoBase*) [function] [call site] 00043
8 google::protobuf::internal::(anonymous namespace)::InitSCC_DFS(google::protobuf::internal::SCCInfoBase*) [function] [call site] 00044
6 google::protobuf::internal::WrappedMutex::Unlock() [function] [call site] 00045
4 sentencepiece::SentencePieceText::internal_default_instance() [function] [call site] 00046
2 sentencepiece::ImmutableSentencePieceText::mutable_proto() [function] [call site] 00047
2 sentencepiece::util::Status::ok() const [function] [call site] 00048
2 sentencepiece::util::Status::~Status() [function] [call site] 00049
2 sentencepiece::ImmutableSentencePieceText::SerializeAsString() const [function] [call site] 00050
3 google::protobuf::MessageLite::SerializeAsString() const [function] [call site] 00051
4 google::protobuf::MessageLite::AppendToString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) const [function] [call site] 00052
5 google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int) [function] [call site] 00053
5 google::protobuf::internal::LogMessage::operator<<(char const*) [function] [call site] 00054
5 google::protobuf::(anonymous namespace)::InitializationErrorMessage(char const*, google::protobuf::MessageLite const&) [function] [call site] 00055
5 google::protobuf::internal::LogMessage::operator<<(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [function] [call site] 00056
5 google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&) [function] [call site] 00057
5 google::protobuf::internal::LogMessage::~LogMessage() [function] [call site] 00058
5 google::protobuf::MessageLite::AppendPartialToString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) const [function] [call site] 00059
6 google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int) [function] [call site] 00060
6 google::protobuf::internal::LogMessage::operator<<(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [function] [call site] 00061
6 google::protobuf::internal::LogMessage::operator<<(char const*) [function] [call site] 00062
6 google::protobuf::internal::LogMessage::operator<<(unsigned long) [function] [call site] 00063
7 snprintf [call site] 00064
6 google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&) [function] [call site] 00065
6 google::protobuf::internal::LogMessage::~LogMessage() [function] [call site] 00066
6 google::protobuf::STLStringResizeUninitialized(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, unsigned long) [function] [call site] 00067
6 google::protobuf::io::mutable_string_data(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) [function] [call site] 00068
6 google::protobuf::SerializeToArrayImpl(google::protobuf::MessageLite const&, unsigned char*, int) [function] [call site] 00069
7 google::protobuf::io::CodedOutputStream::IsDefaultSerializationDeterministic() [function] [call site] 00070
7 google::protobuf::io::EpsCopyOutputStream::EpsCopyOutputStream(void*, int, bool) [function] [call site] 00071
7 google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int) [function] [call site] 00072
7 google::protobuf::internal::LogMessage::operator<<(char const*) [function] [call site] 00073
7 google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&) [function] [call site] 00074
7 google::protobuf::internal::LogMessage::~LogMessage() [function] [call site] 00075
2 sentencepiece::ImmutableSentencePieceText::~ImmutableSentencePieceText() [function] [call site] 00076
1 sentencepiece::SentencePieceProcessor::~SentencePieceProcessor() [function] [call site] 00077