/src/curl_fuzzer/proto_fuzzer/profile_fuzzer.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright (C) Max Dymond, <cmeister2@gmail.com>, et al. |
3 | | * |
4 | | * SPDX-License-Identifier: curl |
5 | | */ |
6 | | |
7 | | /// @file |
8 | | /// @brief Type-safe libprotobuf-mutator hooks for one generated target profile. |
9 | | |
10 | | #ifndef PROTO_FUZZER_PROFILE_FUZZER_H_ |
11 | | #define PROTO_FUZZER_PROFILE_FUZZER_H_ |
12 | | |
13 | | #include <libprotobuf-mutator/src/libfuzzer/libfuzzer_macro.h> |
14 | | |
15 | | #include <array> |
16 | | #include <cstddef> |
17 | | #include <cstdint> |
18 | | |
19 | | #include "curl_fuzzer.pb.h" |
20 | | #include "proto_fuzzer/target_policy.h" |
21 | | #include "proto_fuzzer/target_profile.h" |
22 | | |
23 | | namespace proto_fuzzer { |
24 | | |
25 | | /// Ordinary runtime binding for one generated protobuf profile. |
26 | | /// |
27 | | /// A single binding owns the target profile and every typed LPM callback. This |
28 | | /// keeps libFuzzer entrypoints non-template while guaranteeing mutation, |
29 | | /// crossover, and loading all use the same concrete protobuf message type. |
30 | | struct ProfileFuzzerTraits { |
31 | | /// libFuzzer custom-mutator callback for the bound message type. |
32 | | using CustomMutator = std::size_t (*)(std::uint8_t*, std::size_t, std::size_t, unsigned int); |
33 | | /// libFuzzer custom-crossover callback for the bound message type. |
34 | | using CustomCrossOver = std::size_t (*)(const std::uint8_t*, std::size_t, const std::uint8_t*, std::size_t, |
35 | | std::uint8_t*, std::size_t, unsigned int); |
36 | | /// Parse and lower one input using the bound message type. |
37 | | using InputLoader = bool (*)(const std::uint8_t*, std::size_t, curl::fuzzer::proto::Scenario*); |
38 | | /// Optional profiling-only callback that exercises typed mutation helpers. |
39 | | using MutationProbe = void (*)(); |
40 | | |
41 | | /// Runtime policy permanently associated with all callbacks. |
42 | | TargetProfile profile; |
43 | | /// Typed mutation callback. |
44 | | CustomMutator custom_mutator; |
45 | | /// Typed crossover callback. |
46 | | CustomCrossOver custom_crossover; |
47 | | /// Typed parse-and-lower callback. |
48 | | InputLoader load_input; |
49 | | /// Timing-profile probe, or nullptr for ordinary profiles. |
50 | | MutationProbe probe_mutation_helpers; |
51 | | }; |
52 | | |
53 | | /// Bind all LPM operations for one process to one protobuf message type. |
54 | | /// |
55 | | /// Traits must provide: |
56 | | /// |
57 | | /// - `using Message` for the generated profile root; |
58 | | /// - `static constexpr TargetProfile kProfile`; |
59 | | /// - `Lower(Message*, curl::fuzzer::proto::Scenario*)`; and |
60 | | /// - `Lift(curl::fuzzer::proto::Scenario*, Message*)`; and |
61 | | /// - `PruneConditionalEligibility(curl::fuzzer::proto::Scenario*, |
62 | | /// TargetProfile)`. |
63 | | /// |
64 | | /// Lower and Lift transfer fields directly. They must not serialize, reparse, |
65 | | /// reflection-swap unlike message types, or retain pointers into the source. |
66 | | /// Keeping the same Message in mutation, crossover, and loading is required by |
67 | | /// LPM's process-wide last-mutation cache. |
68 | | template <typename Traits> |
69 | | class ProfileFuzzerHooks { |
70 | | public: |
71 | | /// Concrete generated protobuf root for this target profile. |
72 | | using Message = typename Traits::Message; |
73 | | /// Shared internal Scenario consumed by the runtime. |
74 | | using RuntimeScenario = curl::fuzzer::proto::Scenario; |
75 | | |
76 | | /// Register the profile postprocessor before the first LPM operation. |
77 | 421k | static void EnsurePostProcessor() { |
78 | 421k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( |
79 | 421k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); });proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTelnetTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_telnet::FastTelnetScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_telnet::FastTelnetScenario*, unsigned int) constLine | Count | Source | 79 | 5.23k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFtpTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_ftp::FastFtpScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_ftp::FastFtpScenario*, unsigned int) constLine | Count | Source | 79 | 10.0k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSmtpTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_smtp::FastSmtpScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_smtp::FastSmtpScenario*, unsigned int) constLine | Count | Source | 79 | 6.29k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::HttpsH2Traits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::https_h2::HttpsH2Scenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::https_h2::HttpsH2Scenario*, unsigned int) constLine | Count | Source | 79 | 14.0k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTftpTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_tftp::FastTftpScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_tftp::FastTftpScenario*, unsigned int) constLine | Count | Source | 79 | 2.64k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastWebSocketTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_websocket::FastWebSocketScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_websocket::FastWebSocketScenario*, unsigned int) constLine | Count | Source | 79 | 13.9k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastDictTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_dict::FastDictScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_dict::FastDictScenario*, unsigned int) constLine | Count | Source | 79 | 2.97k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::DeepHttpTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::deep_http::DeepHttpScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::deep_http::DeepHttpScenario*, unsigned int) constLine | Count | Source | 79 | 30.6k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastIpfsTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_ipfs::FastIpfsScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_ipfs::FastIpfsScenario*, unsigned int) constLine | Count | Source | 79 | 13.9k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpsTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_https::FastHttpsScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_https::FastHttpsScenario*, unsigned int) constLine | Count | Source | 79 | 60.3k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastImapTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_imap::FastImapScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_imap::FastImapScenario*, unsigned int) constLine | Count | Source | 79 | 6.57k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastGopherTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_gopher::FastGopherScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_gopher::FastGopherScenario*, unsigned int) constLine | Count | Source | 79 | 9.99k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFileTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_file::FastFileScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_file::FastFileScenario*, unsigned int) constLine | Count | Source | 79 | 4.05k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::TimingTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::timing::TimingScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::timing::TimingScenario*, unsigned int) constLine | Count | Source | 79 | 23.2k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastPop3Traits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_pop3::FastPop3Scenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_pop3::FastPop3Scenario*, unsigned int) constLine | Count | Source | 79 | 4.28k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::MultiTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::multi::MultiScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::multi::MultiScenario*, unsigned int) constLine | Count | Source | 79 | 26.1k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp3Traits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_http3::FastHttp3Scenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_http3::FastHttp3Scenario*, unsigned int) constLine | Count | Source | 79 | 9.96k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::CompatibilityTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::compatibility::CompatibilityScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::compatibility::CompatibilityScenario*, unsigned int) constLine | Count | Source | 79 | 28.8k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ResolverTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::resolver::ResolverScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::resolver::ResolverScenario*, unsigned int) constLine | Count | Source | 79 | 14.2k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ProxyTransportTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::proxy_transport::ProxyTransportScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::proxy_transport::ProxyTransportScenario*, unsigned int) constLine | Count | Source | 79 | 15.7k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp2Traits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_http2::FastHttp2Scenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_http2::FastHttp2Scenario*, unsigned int) constLine | Count | Source | 79 | 22.1k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_http::FastHttpScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_http::FastHttpScenario*, unsigned int) constLine | Count | Source | 79 | 21.3k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ApiTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::api::ApiScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::api::ApiScenario*, unsigned int) constLine | Count | Source | 79 | 26.5k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastLdapTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_ldap::FastLdapScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_ldap::FastLdapScenario*, unsigned int) constLine | Count | Source | 79 | 2.02k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastRtspTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_rtsp::FastRtspScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_rtsp::FastRtspScenario*, unsigned int) constLine | Count | Source | 79 | 9.07k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastMqttTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_mqtt::FastMqttScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_mqtt::FastMqttScenario*, unsigned int) constLine | Count | Source | 79 | 3.92k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSecureWebSocketTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::fast_secure_websocket::FastSecureWebSocketScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::fast_secure_websocket::FastSecureWebSocketScenario*, unsigned int) constLine | Count | Source | 79 | 11.7k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::H2ProxyTraits>::EnsurePostProcessor()::{lambda(curl::fuzzer::generated::h2_proxy::H2ProxyScenario*, unsigned int)#1}::operator()(curl::fuzzer::generated::h2_proxy::H2ProxyScenario*, unsigned int) constLine | Count | Source | 79 | 16.0k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); |
|
80 | 421k | (void)registration; |
81 | 421k | } proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTelnetTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 5.31k | static void EnsurePostProcessor() { | 78 | 5.31k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 5.31k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 5.31k | (void)registration; | 81 | 5.31k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFtpTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 10.1k | static void EnsurePostProcessor() { | 78 | 10.1k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 10.1k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 10.1k | (void)registration; | 81 | 10.1k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSmtpTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 6.43k | static void EnsurePostProcessor() { | 78 | 6.43k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 6.43k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 6.43k | (void)registration; | 81 | 6.43k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::HttpsH2Traits>::EnsurePostProcessor() Line | Count | Source | 77 | 14.4k | static void EnsurePostProcessor() { | 78 | 14.4k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 14.4k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 14.4k | (void)registration; | 81 | 14.4k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTftpTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 2.71k | static void EnsurePostProcessor() { | 78 | 2.71k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 2.71k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 2.71k | (void)registration; | 81 | 2.71k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastWebSocketTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 14.0k | static void EnsurePostProcessor() { | 78 | 14.0k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 14.0k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 14.0k | (void)registration; | 81 | 14.0k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastDictTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 3.04k | static void EnsurePostProcessor() { | 78 | 3.04k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 3.04k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 3.04k | (void)registration; | 81 | 3.04k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::DeepHttpTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 30.8k | static void EnsurePostProcessor() { | 78 | 30.8k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 30.8k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 30.8k | (void)registration; | 81 | 30.8k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastIpfsTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 13.9k | static void EnsurePostProcessor() { | 78 | 13.9k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 13.9k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 13.9k | (void)registration; | 81 | 13.9k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpsTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 61.0k | static void EnsurePostProcessor() { | 78 | 61.0k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 61.0k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 61.0k | (void)registration; | 81 | 61.0k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastImapTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 6.72k | static void EnsurePostProcessor() { | 78 | 6.72k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 6.72k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 6.72k | (void)registration; | 81 | 6.72k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastGopherTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 10.0k | static void EnsurePostProcessor() { | 78 | 10.0k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 10.0k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 10.0k | (void)registration; | 81 | 10.0k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFileTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 4.10k | static void EnsurePostProcessor() { | 78 | 4.10k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 4.10k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 4.10k | (void)registration; | 81 | 4.10k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::TimingTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 23.5k | static void EnsurePostProcessor() { | 78 | 23.5k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 23.5k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 23.5k | (void)registration; | 81 | 23.5k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastPop3Traits>::EnsurePostProcessor() Line | Count | Source | 77 | 4.36k | static void EnsurePostProcessor() { | 78 | 4.36k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 4.36k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 4.36k | (void)registration; | 81 | 4.36k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::MultiTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 26.3k | static void EnsurePostProcessor() { | 78 | 26.3k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 26.3k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 26.3k | (void)registration; | 81 | 26.3k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp3Traits>::EnsurePostProcessor() Line | Count | Source | 77 | 10.2k | static void EnsurePostProcessor() { | 78 | 10.2k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 10.2k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 10.2k | (void)registration; | 81 | 10.2k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::CompatibilityTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 29.3k | static void EnsurePostProcessor() { | 78 | 29.3k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 29.3k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 29.3k | (void)registration; | 81 | 29.3k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ResolverTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 14.5k | static void EnsurePostProcessor() { | 78 | 14.5k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 14.5k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 14.5k | (void)registration; | 81 | 14.5k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ProxyTransportTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 15.7k | static void EnsurePostProcessor() { | 78 | 15.7k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 15.7k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 15.7k | (void)registration; | 81 | 15.7k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp2Traits>::EnsurePostProcessor() Line | Count | Source | 77 | 22.5k | static void EnsurePostProcessor() { | 78 | 22.5k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 22.5k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 22.5k | (void)registration; | 81 | 22.5k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 21.4k | static void EnsurePostProcessor() { | 78 | 21.4k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 21.4k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 21.4k | (void)registration; | 81 | 21.4k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ApiTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 26.8k | static void EnsurePostProcessor() { | 78 | 26.8k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 26.8k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 26.8k | (void)registration; | 81 | 26.8k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastLdapTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 2.04k | static void EnsurePostProcessor() { | 78 | 2.04k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 2.04k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 2.04k | (void)registration; | 81 | 2.04k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastRtspTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 9.14k | static void EnsurePostProcessor() { | 78 | 9.14k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 9.14k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 9.14k | (void)registration; | 81 | 9.14k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastMqttTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 3.98k | static void EnsurePostProcessor() { | 78 | 3.98k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 3.98k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 3.98k | (void)registration; | 81 | 3.98k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSecureWebSocketTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 11.8k | static void EnsurePostProcessor() { | 78 | 11.8k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 11.8k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 11.8k | (void)registration; | 81 | 11.8k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::H2ProxyTraits>::EnsurePostProcessor() Line | Count | Source | 77 | 16.2k | static void EnsurePostProcessor() { | 78 | 16.2k | static const protobuf_mutator::libfuzzer::PostProcessorRegistration<Message> registration( | 79 | 16.2k | [](Message* message, unsigned int /*seed*/) { NormalizeMessage(message); }); | 80 | 16.2k | (void)registration; | 81 | 16.2k | } |
|
82 | | |
83 | | /// Remove unknown wire data, normalize through the common runtime model, |
84 | | /// and lift back into the same generated profile type. |
85 | | /// @param message Generated profile message to normalize in place. |
86 | 416k | static void NormalizeMessage(Message* message) { |
87 | 416k | if (message == nullptr) { |
88 | 0 | return; |
89 | 0 | } |
90 | | |
91 | 416k | message->DiscardUnknownFields(); |
92 | 416k | RuntimeScenario runtime; |
93 | 416k | Traits::Lower(message, &runtime); |
94 | 416k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { |
95 | 387k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); |
96 | 387k | } |
97 | 416k | message->Clear(); |
98 | 416k | Traits::Lift(&runtime, message); |
99 | 416k | } proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTelnetTraits>::NormalizeMessage(curl::fuzzer::generated::fast_telnet::FastTelnetScenario*) Line | Count | Source | 86 | 5.23k | static void NormalizeMessage(Message* message) { | 87 | 5.23k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 5.23k | message->DiscardUnknownFields(); | 92 | 5.23k | RuntimeScenario runtime; | 93 | 5.23k | Traits::Lower(message, &runtime); | 94 | 5.23k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 5.23k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 5.23k | } | 97 | 5.23k | message->Clear(); | 98 | 5.23k | Traits::Lift(&runtime, message); | 99 | 5.23k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFtpTraits>::NormalizeMessage(curl::fuzzer::generated::fast_ftp::FastFtpScenario*) Line | Count | Source | 86 | 10.0k | static void NormalizeMessage(Message* message) { | 87 | 10.0k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 10.0k | message->DiscardUnknownFields(); | 92 | 10.0k | RuntimeScenario runtime; | 93 | 10.0k | Traits::Lower(message, &runtime); | 94 | 10.0k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 10.0k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 10.0k | } | 97 | 10.0k | message->Clear(); | 98 | 10.0k | Traits::Lift(&runtime, message); | 99 | 10.0k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSmtpTraits>::NormalizeMessage(curl::fuzzer::generated::fast_smtp::FastSmtpScenario*) Line | Count | Source | 86 | 6.29k | static void NormalizeMessage(Message* message) { | 87 | 6.29k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 6.29k | message->DiscardUnknownFields(); | 92 | 6.29k | RuntimeScenario runtime; | 93 | 6.29k | Traits::Lower(message, &runtime); | 94 | 6.29k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 6.29k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 6.29k | } | 97 | 6.29k | message->Clear(); | 98 | 6.29k | Traits::Lift(&runtime, message); | 99 | 6.29k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::HttpsH2Traits>::NormalizeMessage(curl::fuzzer::generated::https_h2::HttpsH2Scenario*) Line | Count | Source | 86 | 14.0k | static void NormalizeMessage(Message* message) { | 87 | 14.0k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 14.0k | message->DiscardUnknownFields(); | 92 | 14.0k | RuntimeScenario runtime; | 93 | 14.0k | Traits::Lower(message, &runtime); | 94 | 14.0k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 14.0k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 14.0k | } | 97 | 14.0k | message->Clear(); | 98 | 14.0k | Traits::Lift(&runtime, message); | 99 | 14.0k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTftpTraits>::NormalizeMessage(curl::fuzzer::generated::fast_tftp::FastTftpScenario*) Line | Count | Source | 86 | 2.64k | static void NormalizeMessage(Message* message) { | 87 | 2.64k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 2.64k | message->DiscardUnknownFields(); | 92 | 2.64k | RuntimeScenario runtime; | 93 | 2.64k | Traits::Lower(message, &runtime); | 94 | 2.64k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 2.64k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 2.64k | } | 97 | 2.64k | message->Clear(); | 98 | 2.64k | Traits::Lift(&runtime, message); | 99 | 2.64k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastWebSocketTraits>::NormalizeMessage(curl::fuzzer::generated::fast_websocket::FastWebSocketScenario*) Line | Count | Source | 86 | 13.9k | static void NormalizeMessage(Message* message) { | 87 | 13.9k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 13.9k | message->DiscardUnknownFields(); | 92 | 13.9k | RuntimeScenario runtime; | 93 | 13.9k | Traits::Lower(message, &runtime); | 94 | 13.9k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 13.9k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 13.9k | } | 97 | 13.9k | message->Clear(); | 98 | 13.9k | Traits::Lift(&runtime, message); | 99 | 13.9k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastDictTraits>::NormalizeMessage(curl::fuzzer::generated::fast_dict::FastDictScenario*) Line | Count | Source | 86 | 2.97k | static void NormalizeMessage(Message* message) { | 87 | 2.97k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 2.97k | message->DiscardUnknownFields(); | 92 | 2.97k | RuntimeScenario runtime; | 93 | 2.97k | Traits::Lower(message, &runtime); | 94 | 2.97k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 2.97k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 2.97k | } | 97 | 2.97k | message->Clear(); | 98 | 2.97k | Traits::Lift(&runtime, message); | 99 | 2.97k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::DeepHttpTraits>::NormalizeMessage(curl::fuzzer::generated::deep_http::DeepHttpScenario*) Line | Count | Source | 86 | 30.6k | static void NormalizeMessage(Message* message) { | 87 | 30.6k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 30.6k | message->DiscardUnknownFields(); | 92 | 30.6k | RuntimeScenario runtime; | 93 | 30.6k | Traits::Lower(message, &runtime); | 94 | 30.6k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 30.6k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 30.6k | } | 97 | 30.6k | message->Clear(); | 98 | 30.6k | Traits::Lift(&runtime, message); | 99 | 30.6k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastIpfsTraits>::NormalizeMessage(curl::fuzzer::generated::fast_ipfs::FastIpfsScenario*) Line | Count | Source | 86 | 13.9k | static void NormalizeMessage(Message* message) { | 87 | 13.9k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 13.9k | message->DiscardUnknownFields(); | 92 | 13.9k | RuntimeScenario runtime; | 93 | 13.9k | Traits::Lower(message, &runtime); | 94 | 13.9k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 13.9k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 13.9k | } | 97 | 13.9k | message->Clear(); | 98 | 13.9k | Traits::Lift(&runtime, message); | 99 | 13.9k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpsTraits>::NormalizeMessage(curl::fuzzer::generated::fast_https::FastHttpsScenario*) Line | Count | Source | 86 | 60.3k | static void NormalizeMessage(Message* message) { | 87 | 60.3k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 60.3k | message->DiscardUnknownFields(); | 92 | 60.3k | RuntimeScenario runtime; | 93 | 60.3k | Traits::Lower(message, &runtime); | 94 | 60.3k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 60.3k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 60.3k | } | 97 | 60.3k | message->Clear(); | 98 | 60.3k | Traits::Lift(&runtime, message); | 99 | 60.3k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastImapTraits>::NormalizeMessage(curl::fuzzer::generated::fast_imap::FastImapScenario*) Line | Count | Source | 86 | 6.57k | static void NormalizeMessage(Message* message) { | 87 | 6.57k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 6.57k | message->DiscardUnknownFields(); | 92 | 6.57k | RuntimeScenario runtime; | 93 | 6.57k | Traits::Lower(message, &runtime); | 94 | 6.57k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 6.57k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 6.57k | } | 97 | 6.57k | message->Clear(); | 98 | 6.57k | Traits::Lift(&runtime, message); | 99 | 6.57k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastGopherTraits>::NormalizeMessage(curl::fuzzer::generated::fast_gopher::FastGopherScenario*) Line | Count | Source | 86 | 9.99k | static void NormalizeMessage(Message* message) { | 87 | 9.99k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 9.99k | message->DiscardUnknownFields(); | 92 | 9.99k | RuntimeScenario runtime; | 93 | 9.99k | Traits::Lower(message, &runtime); | 94 | 9.99k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 9.99k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 9.99k | } | 97 | 9.99k | message->Clear(); | 98 | 9.99k | Traits::Lift(&runtime, message); | 99 | 9.99k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFileTraits>::NormalizeMessage(curl::fuzzer::generated::fast_file::FastFileScenario*) Line | Count | Source | 86 | 4.05k | static void NormalizeMessage(Message* message) { | 87 | 4.05k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 4.05k | message->DiscardUnknownFields(); | 92 | 4.05k | RuntimeScenario runtime; | 93 | 4.05k | Traits::Lower(message, &runtime); | 94 | 4.05k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 4.05k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 4.05k | } | 97 | 4.05k | message->Clear(); | 98 | 4.05k | Traits::Lift(&runtime, message); | 99 | 4.05k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::TimingTraits>::NormalizeMessage(curl::fuzzer::generated::timing::TimingScenario*) Line | Count | Source | 86 | 23.2k | static void NormalizeMessage(Message* message) { | 87 | 23.2k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 23.2k | message->DiscardUnknownFields(); | 92 | 23.2k | RuntimeScenario runtime; | 93 | 23.2k | Traits::Lower(message, &runtime); | 94 | 23.2k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 23.2k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 23.2k | } | 97 | 23.2k | message->Clear(); | 98 | 23.2k | Traits::Lift(&runtime, message); | 99 | 23.2k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastPop3Traits>::NormalizeMessage(curl::fuzzer::generated::fast_pop3::FastPop3Scenario*) Line | Count | Source | 86 | 4.28k | static void NormalizeMessage(Message* message) { | 87 | 4.28k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 4.28k | message->DiscardUnknownFields(); | 92 | 4.28k | RuntimeScenario runtime; | 93 | 4.28k | Traits::Lower(message, &runtime); | 94 | 4.28k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 4.28k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 4.28k | } | 97 | 4.28k | message->Clear(); | 98 | 4.28k | Traits::Lift(&runtime, message); | 99 | 4.28k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::MultiTraits>::NormalizeMessage(curl::fuzzer::generated::multi::MultiScenario*) Line | Count | Source | 86 | 26.1k | static void NormalizeMessage(Message* message) { | 87 | 26.1k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 26.1k | message->DiscardUnknownFields(); | 92 | 26.1k | RuntimeScenario runtime; | 93 | 26.1k | Traits::Lower(message, &runtime); | 94 | 26.1k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 26.1k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 26.1k | } | 97 | 26.1k | message->Clear(); | 98 | 26.1k | Traits::Lift(&runtime, message); | 99 | 26.1k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp3Traits>::NormalizeMessage(curl::fuzzer::generated::fast_http3::FastHttp3Scenario*) Line | Count | Source | 86 | 9.96k | static void NormalizeMessage(Message* message) { | 87 | 9.96k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 9.96k | message->DiscardUnknownFields(); | 92 | 9.96k | RuntimeScenario runtime; | 93 | 9.96k | Traits::Lower(message, &runtime); | 94 | 9.96k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 9.96k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 9.96k | } | 97 | 9.96k | message->Clear(); | 98 | 9.96k | Traits::Lift(&runtime, message); | 99 | 9.96k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::CompatibilityTraits>::NormalizeMessage(curl::fuzzer::generated::compatibility::CompatibilityScenario*) Line | Count | Source | 86 | 28.8k | static void NormalizeMessage(Message* message) { | 87 | 28.8k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 28.8k | message->DiscardUnknownFields(); | 92 | 28.8k | RuntimeScenario runtime; | 93 | 28.8k | Traits::Lower(message, &runtime); | 94 | | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | | } | 97 | 28.8k | message->Clear(); | 98 | 28.8k | Traits::Lift(&runtime, message); | 99 | 28.8k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ResolverTraits>::NormalizeMessage(curl::fuzzer::generated::resolver::ResolverScenario*) Line | Count | Source | 86 | 14.2k | static void NormalizeMessage(Message* message) { | 87 | 14.2k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 14.2k | message->DiscardUnknownFields(); | 92 | 14.2k | RuntimeScenario runtime; | 93 | 14.2k | Traits::Lower(message, &runtime); | 94 | 14.2k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 14.2k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 14.2k | } | 97 | 14.2k | message->Clear(); | 98 | 14.2k | Traits::Lift(&runtime, message); | 99 | 14.2k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ProxyTransportTraits>::NormalizeMessage(curl::fuzzer::generated::proxy_transport::ProxyTransportScenario*) Line | Count | Source | 86 | 15.7k | static void NormalizeMessage(Message* message) { | 87 | 15.7k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 15.7k | message->DiscardUnknownFields(); | 92 | 15.7k | RuntimeScenario runtime; | 93 | 15.7k | Traits::Lower(message, &runtime); | 94 | 15.7k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 15.7k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 15.7k | } | 97 | 15.7k | message->Clear(); | 98 | 15.7k | Traits::Lift(&runtime, message); | 99 | 15.7k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp2Traits>::NormalizeMessage(curl::fuzzer::generated::fast_http2::FastHttp2Scenario*) Line | Count | Source | 86 | 22.1k | static void NormalizeMessage(Message* message) { | 87 | 22.1k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 22.1k | message->DiscardUnknownFields(); | 92 | 22.1k | RuntimeScenario runtime; | 93 | 22.1k | Traits::Lower(message, &runtime); | 94 | 22.1k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 22.1k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 22.1k | } | 97 | 22.1k | message->Clear(); | 98 | 22.1k | Traits::Lift(&runtime, message); | 99 | 22.1k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpTraits>::NormalizeMessage(curl::fuzzer::generated::fast_http::FastHttpScenario*) Line | Count | Source | 86 | 21.3k | static void NormalizeMessage(Message* message) { | 87 | 21.3k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 21.3k | message->DiscardUnknownFields(); | 92 | 21.3k | RuntimeScenario runtime; | 93 | 21.3k | Traits::Lower(message, &runtime); | 94 | 21.3k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 21.3k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 21.3k | } | 97 | 21.3k | message->Clear(); | 98 | 21.3k | Traits::Lift(&runtime, message); | 99 | 21.3k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ApiTraits>::NormalizeMessage(curl::fuzzer::generated::api::ApiScenario*) Line | Count | Source | 86 | 26.5k | static void NormalizeMessage(Message* message) { | 87 | 26.5k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 26.5k | message->DiscardUnknownFields(); | 92 | 26.5k | RuntimeScenario runtime; | 93 | 26.5k | Traits::Lower(message, &runtime); | 94 | 26.5k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 26.5k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 26.5k | } | 97 | 26.5k | message->Clear(); | 98 | 26.5k | Traits::Lift(&runtime, message); | 99 | 26.5k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastLdapTraits>::NormalizeMessage(curl::fuzzer::generated::fast_ldap::FastLdapScenario*) Line | Count | Source | 86 | 2.02k | static void NormalizeMessage(Message* message) { | 87 | 2.02k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 2.02k | message->DiscardUnknownFields(); | 92 | 2.02k | RuntimeScenario runtime; | 93 | 2.02k | Traits::Lower(message, &runtime); | 94 | 2.02k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 2.02k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 2.02k | } | 97 | 2.02k | message->Clear(); | 98 | 2.02k | Traits::Lift(&runtime, message); | 99 | 2.02k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastRtspTraits>::NormalizeMessage(curl::fuzzer::generated::fast_rtsp::FastRtspScenario*) Line | Count | Source | 86 | 9.07k | static void NormalizeMessage(Message* message) { | 87 | 9.07k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 9.07k | message->DiscardUnknownFields(); | 92 | 9.07k | RuntimeScenario runtime; | 93 | 9.07k | Traits::Lower(message, &runtime); | 94 | 9.07k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 9.07k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 9.07k | } | 97 | 9.07k | message->Clear(); | 98 | 9.07k | Traits::Lift(&runtime, message); | 99 | 9.07k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastMqttTraits>::NormalizeMessage(curl::fuzzer::generated::fast_mqtt::FastMqttScenario*) Line | Count | Source | 86 | 3.92k | static void NormalizeMessage(Message* message) { | 87 | 3.92k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 3.92k | message->DiscardUnknownFields(); | 92 | 3.92k | RuntimeScenario runtime; | 93 | 3.92k | Traits::Lower(message, &runtime); | 94 | 3.92k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 3.92k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 3.92k | } | 97 | 3.92k | message->Clear(); | 98 | 3.92k | Traits::Lift(&runtime, message); | 99 | 3.92k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSecureWebSocketTraits>::NormalizeMessage(curl::fuzzer::generated::fast_secure_websocket::FastSecureWebSocketScenario*) Line | Count | Source | 86 | 11.7k | static void NormalizeMessage(Message* message) { | 87 | 11.7k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 11.7k | message->DiscardUnknownFields(); | 92 | 11.7k | RuntimeScenario runtime; | 93 | 11.7k | Traits::Lower(message, &runtime); | 94 | 11.7k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 11.7k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 11.7k | } | 97 | 11.7k | message->Clear(); | 98 | 11.7k | Traits::Lift(&runtime, message); | 99 | 11.7k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::H2ProxyTraits>::NormalizeMessage(curl::fuzzer::generated::h2_proxy::H2ProxyScenario*) Line | Count | Source | 86 | 16.0k | static void NormalizeMessage(Message* message) { | 87 | 16.0k | if (message == nullptr) { | 88 | 0 | return; | 89 | 0 | } | 90 | | | 91 | 16.0k | message->DiscardUnknownFields(); | 92 | 16.0k | RuntimeScenario runtime; | 93 | 16.0k | Traits::Lower(message, &runtime); | 94 | 16.0k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 95 | 16.0k | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 96 | 16.0k | } | 97 | 16.0k | message->Clear(); | 98 | 16.0k | Traits::Lift(&runtime, message); | 99 | 16.0k | } |
|
100 | | |
101 | | /// Mutate a binary profile message and retain its exact type in LPM's cache. |
102 | | /// @param data Serialized profile message buffer to mutate in place. |
103 | | /// @param size Number of input bytes currently stored in `data`. |
104 | | /// @param max_size Capacity of `data` available for the mutated message. |
105 | | /// @param seed Deterministic mutation seed supplied by libFuzzer. |
106 | | /// @return Number of serialized bytes in the mutated message. |
107 | 61 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { |
108 | 61 | EnsurePostProcessor(); |
109 | 61 | Message message; |
110 | 61 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); |
111 | 61 | } proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTelnetTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFtpTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSmtpTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::HttpsH2Traits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTftpTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastWebSocketTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastDictTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::DeepHttpTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastIpfsTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpsTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 6 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 6 | EnsurePostProcessor(); | 109 | 6 | Message message; | 110 | 6 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 6 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastImapTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastGopherTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFileTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::TimingTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 3 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 3 | EnsurePostProcessor(); | 109 | 3 | Message message; | 110 | 3 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 3 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastPop3Traits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::MultiTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp3Traits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::CompatibilityTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ResolverTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ProxyTransportTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp2Traits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ApiTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastLdapTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastRtspTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastMqttTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSecureWebSocketTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::H2ProxyTraits>::CustomMutator(unsigned char*, unsigned long, unsigned long, unsigned int) Line | Count | Source | 107 | 2 | static std::size_t CustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed) { | 108 | 2 | EnsurePostProcessor(); | 109 | 2 | Message message; | 110 | 2 | return protobuf_mutator::libfuzzer::CustomProtoMutator(true, data, size, max_size, seed, &message); | 111 | 2 | } |
|
112 | | |
113 | | /// Cross two binary profile messages using the same type as mutation/load. |
114 | | /// @param data1 Serialized first parent message. |
115 | | /// @param size1 Number of bytes in `data1`. |
116 | | /// @param data2 Serialized second parent message. |
117 | | /// @param size2 Number of bytes in `data2`. |
118 | | /// @param out Destination buffer for the crossed message. |
119 | | /// @param max_out_size Capacity of `out`. |
120 | | /// @param seed Deterministic crossover seed supplied by libFuzzer. |
121 | | /// @return Number of serialized bytes written to `out`. |
122 | | static std::size_t CustomCrossOver(const std::uint8_t* data1, std::size_t size1, const std::uint8_t* data2, |
123 | | std::size_t size2, std::uint8_t* out, std::size_t max_out_size, |
124 | 31 | unsigned int seed) { |
125 | 31 | EnsurePostProcessor(); |
126 | 31 | Message message1; |
127 | 31 | Message message2; |
128 | 31 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, |
129 | 31 | &message1, &message2); |
130 | 31 | } proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTelnetTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFtpTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSmtpTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::HttpsH2Traits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTftpTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastWebSocketTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastDictTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::DeepHttpTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastIpfsTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpsTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 3 | unsigned int seed) { | 125 | 3 | EnsurePostProcessor(); | 126 | 3 | Message message1; | 127 | 3 | Message message2; | 128 | 3 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 3 | &message1, &message2); | 130 | 3 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastImapTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastGopherTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFileTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::TimingTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 2 | unsigned int seed) { | 125 | 2 | EnsurePostProcessor(); | 126 | 2 | Message message1; | 127 | 2 | Message message2; | 128 | 2 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 2 | &message1, &message2); | 130 | 2 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastPop3Traits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::MultiTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp3Traits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::CompatibilityTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ResolverTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ProxyTransportTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp2Traits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ApiTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastLdapTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastRtspTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastMqttTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSecureWebSocketTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::H2ProxyTraits>::CustomCrossOver(unsigned char const*, unsigned long, unsigned char const*, unsigned long, unsigned char*, unsigned long, unsigned int) Line | Count | Source | 124 | 1 | unsigned int seed) { | 125 | 1 | EnsurePostProcessor(); | 126 | 1 | Message message1; | 127 | 1 | Message message2; | 128 | 1 | return protobuf_mutator::libfuzzer::CustomProtoCrossOver(true, data1, size1, data2, size2, out, max_out_size, seed, | 129 | 1 | &message1, &message2); | 130 | 1 | } |
|
131 | | |
132 | | /// Load one binary profile message and transfer it into owned runtime state. |
133 | | /// |
134 | | /// This deliberately uses LPM's ordinary input unchanged. On a cache hit, |
135 | | /// the cached Message is the same concrete type used above; on a parse path, |
136 | | /// LPM invokes the registered postprocessor before this direct lowering. |
137 | | /// @param data Serialized profile message bytes. |
138 | | /// @param size Number of bytes available at `data`. |
139 | | /// @param runtime Destination for the owned, lowered runtime Scenario. |
140 | | /// @return Whether the input loaded and lowered successfully. |
141 | 421k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { |
142 | 421k | if (runtime == nullptr) { |
143 | 0 | return false; |
144 | 0 | } |
145 | | |
146 | 421k | EnsurePostProcessor(); |
147 | 421k | Message message; |
148 | 421k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { |
149 | 5.14k | return false; |
150 | 5.14k | } |
151 | | |
152 | | // Mutated inputs have already passed the postprocessor before entering |
153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is |
154 | | // harmless and makes the lowering boundary fail closed for either path. |
155 | 415k | message.DiscardUnknownFields(); |
156 | 415k | runtime->Clear(); |
157 | 415k | Traits::Lower(&message, runtime); |
158 | | // A projected profile root intentionally cannot carry policy-owned state |
159 | | // such as a fixed scheme. The postprocessor normalized that state before |
160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering |
161 | | // boundary instead of assuming the serialized root can round-trip it. |
162 | 415k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { |
163 | 387k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); |
164 | 387k | } |
165 | 415k | return true; |
166 | 421k | } proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTelnetTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 5.30k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 5.30k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 5.30k | EnsurePostProcessor(); | 147 | 5.30k | Message message; | 148 | 5.30k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 76 | return false; | 150 | 76 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 5.23k | message.DiscardUnknownFields(); | 156 | 5.23k | runtime->Clear(); | 157 | 5.23k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 5.23k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 5.23k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 5.23k | } | 165 | 5.23k | return true; | 166 | 5.30k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFtpTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 10.0k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 10.0k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 10.0k | EnsurePostProcessor(); | 147 | 10.0k | Message message; | 148 | 10.0k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 85 | return false; | 150 | 85 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 10.0k | message.DiscardUnknownFields(); | 156 | 10.0k | runtime->Clear(); | 157 | 10.0k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 10.0k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 10.0k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 10.0k | } | 165 | 10.0k | return true; | 166 | 10.0k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSmtpTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 6.43k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 6.43k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 6.43k | EnsurePostProcessor(); | 147 | 6.43k | Message message; | 148 | 6.43k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 146 | return false; | 150 | 146 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 6.28k | message.DiscardUnknownFields(); | 156 | 6.28k | runtime->Clear(); | 157 | 6.28k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 6.28k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 6.28k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 6.28k | } | 165 | 6.28k | return true; | 166 | 6.43k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::HttpsH2Traits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 14.4k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 14.4k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 14.4k | EnsurePostProcessor(); | 147 | 14.4k | Message message; | 148 | 14.4k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 418 | return false; | 150 | 418 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 14.0k | message.DiscardUnknownFields(); | 156 | 14.0k | runtime->Clear(); | 157 | 14.0k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 14.0k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 14.0k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 14.0k | } | 165 | 14.0k | return true; | 166 | 14.4k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastTftpTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 2.70k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 2.70k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 2.70k | EnsurePostProcessor(); | 147 | 2.70k | Message message; | 148 | 2.70k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 66 | return false; | 150 | 66 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 2.64k | message.DiscardUnknownFields(); | 156 | 2.64k | runtime->Clear(); | 157 | 2.64k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 2.64k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 2.64k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 2.64k | } | 165 | 2.64k | return true; | 166 | 2.70k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastWebSocketTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 14.0k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 14.0k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 14.0k | EnsurePostProcessor(); | 147 | 14.0k | Message message; | 148 | 14.0k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 129 | return false; | 150 | 129 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 13.9k | message.DiscardUnknownFields(); | 156 | 13.9k | runtime->Clear(); | 157 | 13.9k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 13.9k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 13.9k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 13.9k | } | 165 | 13.9k | return true; | 166 | 14.0k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastDictTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 3.04k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 3.04k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 3.04k | EnsurePostProcessor(); | 147 | 3.04k | Message message; | 148 | 3.04k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 74 | return false; | 150 | 74 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 2.97k | message.DiscardUnknownFields(); | 156 | 2.97k | runtime->Clear(); | 157 | 2.97k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 2.97k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 2.97k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 2.97k | } | 165 | 2.97k | return true; | 166 | 3.04k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::DeepHttpTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 30.8k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 30.8k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 30.8k | EnsurePostProcessor(); | 147 | 30.8k | Message message; | 148 | 30.8k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 210 | return false; | 150 | 210 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 30.6k | message.DiscardUnknownFields(); | 156 | 30.6k | runtime->Clear(); | 157 | 30.6k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 30.6k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 30.6k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 30.6k | } | 165 | 30.6k | return true; | 166 | 30.8k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastIpfsTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 13.9k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 13.9k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 13.9k | EnsurePostProcessor(); | 147 | 13.9k | Message message; | 148 | 13.9k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 72 | return false; | 150 | 72 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 13.9k | message.DiscardUnknownFields(); | 156 | 13.9k | runtime->Clear(); | 157 | 13.9k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 13.9k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 13.9k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 13.9k | } | 165 | 13.9k | return true; | 166 | 13.9k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpsTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 61.0k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 61.0k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 61.0k | EnsurePostProcessor(); | 147 | 61.0k | Message message; | 148 | 61.0k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 681 | return false; | 150 | 681 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 60.3k | message.DiscardUnknownFields(); | 156 | 60.3k | runtime->Clear(); | 157 | 60.3k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 60.3k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 60.3k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 60.3k | } | 165 | 60.3k | return true; | 166 | 61.0k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastImapTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 6.71k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 6.71k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 6.71k | EnsurePostProcessor(); | 147 | 6.71k | Message message; | 148 | 6.71k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 145 | return false; | 150 | 145 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 6.57k | message.DiscardUnknownFields(); | 156 | 6.57k | runtime->Clear(); | 157 | 6.57k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 6.57k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 6.57k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 6.57k | } | 165 | 6.57k | return true; | 166 | 6.71k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastGopherTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 10.0k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 10.0k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 10.0k | EnsurePostProcessor(); | 147 | 10.0k | Message message; | 148 | 10.0k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 103 | return false; | 150 | 103 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 9.99k | message.DiscardUnknownFields(); | 156 | 9.99k | runtime->Clear(); | 157 | 9.99k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 9.99k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 9.99k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 9.99k | } | 165 | 9.99k | return true; | 166 | 10.0k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastFileTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 4.10k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 4.10k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 4.10k | EnsurePostProcessor(); | 147 | 4.10k | Message message; | 148 | 4.10k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 52 | return false; | 150 | 52 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 4.05k | message.DiscardUnknownFields(); | 156 | 4.05k | runtime->Clear(); | 157 | 4.05k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 4.05k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 4.05k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 4.05k | } | 165 | 4.05k | return true; | 166 | 4.10k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::TimingTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 23.4k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 23.4k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 23.4k | EnsurePostProcessor(); | 147 | 23.4k | Message message; | 148 | 23.4k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 218 | return false; | 150 | 218 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 23.2k | message.DiscardUnknownFields(); | 156 | 23.2k | runtime->Clear(); | 157 | 23.2k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 23.2k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 23.2k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 23.2k | } | 165 | 23.2k | return true; | 166 | 23.4k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastPop3Traits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 4.36k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 4.36k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 4.36k | EnsurePostProcessor(); | 147 | 4.36k | Message message; | 148 | 4.36k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 76 | return false; | 150 | 76 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 4.28k | message.DiscardUnknownFields(); | 156 | 4.28k | runtime->Clear(); | 157 | 4.28k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 4.28k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 4.28k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 4.28k | } | 165 | 4.28k | return true; | 166 | 4.36k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::MultiTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 26.3k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 26.3k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 26.3k | EnsurePostProcessor(); | 147 | 26.3k | Message message; | 148 | 26.3k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 243 | return false; | 150 | 243 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 26.1k | message.DiscardUnknownFields(); | 156 | 26.1k | runtime->Clear(); | 157 | 26.1k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 26.1k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 26.1k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 26.1k | } | 165 | 26.1k | return true; | 166 | 26.3k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp3Traits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 10.2k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 10.2k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 10.2k | EnsurePostProcessor(); | 147 | 10.2k | Message message; | 148 | 10.2k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 306 | return false; | 150 | 306 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 9.96k | message.DiscardUnknownFields(); | 156 | 9.96k | runtime->Clear(); | 157 | 9.96k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 9.96k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 9.96k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 9.96k | } | 165 | 9.96k | return true; | 166 | 10.2k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::CompatibilityTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 29.3k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 29.3k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 29.3k | EnsurePostProcessor(); | 147 | 29.3k | Message message; | 148 | 29.3k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 542 | return false; | 150 | 542 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 28.8k | message.DiscardUnknownFields(); | 156 | 28.8k | runtime->Clear(); | 157 | 28.8k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | | } | 165 | 28.8k | return true; | 166 | 29.3k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ResolverTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 14.5k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 14.5k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 14.5k | EnsurePostProcessor(); | 147 | 14.5k | Message message; | 148 | 14.5k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 326 | return false; | 150 | 326 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 14.2k | message.DiscardUnknownFields(); | 156 | 14.2k | runtime->Clear(); | 157 | 14.2k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 14.2k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 14.2k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 14.2k | } | 165 | 14.2k | return true; | 166 | 14.5k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ProxyTransportTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 15.7k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 15.7k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 15.7k | EnsurePostProcessor(); | 147 | 15.7k | Message message; | 148 | 15.7k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 59 | return false; | 150 | 59 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 15.6k | message.DiscardUnknownFields(); | 156 | 15.6k | runtime->Clear(); | 157 | 15.6k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 15.6k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 15.6k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 15.6k | } | 165 | 15.6k | return true; | 166 | 15.7k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttp2Traits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 22.5k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 22.5k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 22.5k | EnsurePostProcessor(); | 147 | 22.5k | Message message; | 148 | 22.5k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 416 | return false; | 150 | 416 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 22.1k | message.DiscardUnknownFields(); | 156 | 22.1k | runtime->Clear(); | 157 | 22.1k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 22.1k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 22.1k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 22.1k | } | 165 | 22.1k | return true; | 166 | 22.5k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastHttpTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 21.4k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 21.4k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 21.4k | EnsurePostProcessor(); | 147 | 21.4k | Message message; | 148 | 21.4k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 56 | return false; | 150 | 56 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 21.3k | message.DiscardUnknownFields(); | 156 | 21.3k | runtime->Clear(); | 157 | 21.3k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 21.3k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 21.3k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 21.3k | } | 165 | 21.3k | return true; | 166 | 21.4k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::ApiTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 26.8k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 26.8k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 26.8k | EnsurePostProcessor(); | 147 | 26.8k | Message message; | 148 | 26.8k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 209 | return false; | 150 | 209 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 26.5k | message.DiscardUnknownFields(); | 156 | 26.5k | runtime->Clear(); | 157 | 26.5k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 26.5k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 26.5k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 26.5k | } | 165 | 26.5k | return true; | 166 | 26.8k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastLdapTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 2.04k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 2.04k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 2.04k | EnsurePostProcessor(); | 147 | 2.04k | Message message; | 148 | 2.04k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 17 | return false; | 150 | 17 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 2.02k | message.DiscardUnknownFields(); | 156 | 2.02k | runtime->Clear(); | 157 | 2.02k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 2.02k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 2.02k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 2.02k | } | 165 | 2.02k | return true; | 166 | 2.04k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastRtspTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 9.14k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 9.14k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 9.14k | EnsurePostProcessor(); | 147 | 9.14k | Message message; | 148 | 9.14k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 74 | return false; | 150 | 74 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 9.07k | message.DiscardUnknownFields(); | 156 | 9.07k | runtime->Clear(); | 157 | 9.07k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 9.07k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 9.07k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 9.07k | } | 165 | 9.07k | return true; | 166 | 9.14k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastMqttTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 3.98k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 3.98k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 3.98k | EnsurePostProcessor(); | 147 | 3.98k | Message message; | 148 | 3.98k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 60 | return false; | 150 | 60 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 3.92k | message.DiscardUnknownFields(); | 156 | 3.92k | runtime->Clear(); | 157 | 3.92k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 3.92k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 3.92k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 3.92k | } | 165 | 3.92k | return true; | 166 | 3.98k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::FastSecureWebSocketTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 11.8k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 11.8k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 11.8k | EnsurePostProcessor(); | 147 | 11.8k | Message message; | 148 | 11.8k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 127 | return false; | 150 | 127 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 11.7k | message.DiscardUnknownFields(); | 156 | 11.7k | runtime->Clear(); | 157 | 11.7k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 11.7k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 11.7k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 11.7k | } | 165 | 11.7k | return true; | 166 | 11.8k | } |
proto_fuzzer::ProfileFuzzerHooks<proto_fuzzer::generated::H2ProxyTraits>::LoadAndLower(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 141 | 16.2k | static bool LoadAndLower(const std::uint8_t* data, std::size_t size, RuntimeScenario* runtime) { | 142 | 16.2k | if (runtime == nullptr) { | 143 | 0 | return false; | 144 | 0 | } | 145 | | | 146 | 16.2k | EnsurePostProcessor(); | 147 | 16.2k | Message message; | 148 | 16.2k | if (!protobuf_mutator::libfuzzer::LoadProtoInput(true, data, size, &message)) { | 149 | 156 | return false; | 150 | 156 | } | 151 | | | 152 | | // Mutated inputs have already passed the postprocessor before entering | 153 | | // LPM's cache. Parsed inputs pass it in Fix(). Discarding once more is | 154 | | // harmless and makes the lowering boundary fail closed for either path. | 155 | 16.0k | message.DiscardUnknownFields(); | 156 | 16.0k | runtime->Clear(); | 157 | 16.0k | Traits::Lower(&message, runtime); | 158 | | // A projected profile root intentionally cannot carry policy-owned state | 159 | | // such as a fixed scheme. The postprocessor normalized that state before | 160 | | // Lift, but Lift necessarily omitted it; restore it at the final lowering | 161 | | // boundary instead of assuming the serialized root can round-trip it. | 162 | 16.0k | if constexpr (Traits::kProfile != TargetProfile::kCompatibility) { | 163 | 16.0k | NormalizeScenarioForTarget(runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); | 164 | 16.0k | } | 165 | 16.0k | return true; | 166 | 16.2k | } |
|
167 | | }; |
168 | | |
169 | | /// Load one generated profile message and lower it into runtime state. |
170 | | /// @tparam Traits Generated adapter defining the concrete message type. |
171 | | /// @param data Serialized generated-profile bytes. |
172 | | /// @param size Number of bytes available at `data`. |
173 | | /// @param runtime Destination for the owned runtime Scenario. |
174 | | /// @return Whether parsing and lowering succeeded. |
175 | | template <typename Traits> |
176 | 421k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { |
177 | 421k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); |
178 | 421k | } bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastTelnetTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 5.30k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 5.30k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 5.30k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastFtpTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 10.0k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 10.0k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 10.0k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastSmtpTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 6.43k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 6.43k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 6.43k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::HttpsH2Traits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 14.4k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 14.4k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 14.4k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastTftpTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 2.70k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 2.70k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 2.70k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastWebSocketTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 14.0k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 14.0k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 14.0k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastDictTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 3.04k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 3.04k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 3.04k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::DeepHttpTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 30.8k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 30.8k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 30.8k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastIpfsTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 13.9k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 13.9k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 13.9k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastHttpsTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 61.0k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 61.0k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 61.0k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastImapTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 6.71k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 6.71k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 6.71k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastGopherTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 10.0k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 10.0k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 10.0k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastFileTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 4.10k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 4.10k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 4.10k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::TimingTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 23.4k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 23.4k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 23.4k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastPop3Traits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 4.36k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 4.36k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 4.36k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::MultiTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 26.3k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 26.3k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 26.3k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastHttp3Traits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 10.2k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 10.2k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 10.2k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::CompatibilityTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 29.3k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 29.3k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 29.3k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::ResolverTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 14.5k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 14.5k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 14.5k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::ProxyTransportTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 15.7k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 15.7k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 15.7k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastHttp2Traits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 22.5k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 22.5k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 22.5k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastHttpTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 21.4k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 21.4k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 21.4k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::ApiTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 26.8k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 26.8k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 26.8k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastLdapTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 2.04k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 2.04k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 2.04k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastRtspTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 9.14k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 9.14k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 9.14k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastMqttTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 3.98k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 3.98k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 3.98k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::FastSecureWebSocketTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 11.8k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 11.8k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 11.8k | } |
bool proto_fuzzer::LoadProfileInput<proto_fuzzer::generated::H2ProxyTraits>(unsigned char const*, unsigned long, curl::fuzzer::proto::Scenario*) Line | Count | Source | 176 | 16.2k | bool LoadProfileInput(const std::uint8_t* data, std::size_t size, curl::fuzzer::proto::Scenario* runtime) { | 177 | 16.2k | return ProfileFuzzerHooks<Traits>::LoadAndLower(data, size, runtime); | 178 | 16.2k | } |
|
179 | | |
180 | | /// Exercise the typed mutation ABI once for the profiling timing target. |
181 | | /// @tparam Traits Generated adapter defining the concrete message type. |
182 | | template <typename Traits> |
183 | 23.4k | void ProbeTimingMutationHelpers() { |
184 | 23.4k | static const bool mutation_helpers_probed = [] { |
185 | 1 | constexpr std::size_t kBufferSize = 1024; |
186 | 1 | constexpr unsigned int kMutationSeed = 0x4355524cU; |
187 | | |
188 | 1 | curl::fuzzer::proto::Scenario runtime; |
189 | 1 | NormalizeScenarioForTarget(&runtime, Traits::kProfile, &Traits::PruneConditionalEligibility); |
190 | | |
191 | 1 | typename Traits::Message message; |
192 | 1 | Traits::Lift(&runtime, &message); |
193 | 1 | std::array<std::uint8_t, kBufferSize> first = {}; |
194 | 1 | const std::size_t original_size = message.ByteSizeLong(); |
195 | 1 | if (original_size > first.size()) { |
196 | 0 | return true; |
197 | 0 | } |
198 | 1 | (void)message.SerializeWithCachedSizesToArray(first.data()); |
199 | | |
200 | 1 | using Hooks = ProfileFuzzerHooks<Traits>; |
201 | 1 | std::array<std::uint8_t, kBufferSize> second = first; |
202 | 1 | std::array<std::uint8_t, kBufferSize> child = {}; |
203 | 1 | const std::size_t mutated_size = Hooks::CustomMutator(first.data(), original_size, first.size(), kMutationSeed); |
204 | 1 | const std::size_t crossed_size = Hooks::CustomCrossOver(first.data(), mutated_size, second.data(), original_size, |
205 | 1 | child.data(), child.size(), kMutationSeed); |
206 | 1 | const volatile std::size_t result_sizes[] = {mutated_size, crossed_size}; |
207 | 1 | (void)result_sizes; |
208 | 1 | return true; |
209 | 1 | }(); |
210 | 23.4k | (void)mutation_helpers_probed; |
211 | 23.4k | } |
212 | | |
213 | | /// Bind one generated adapter to the ordinary entrypoint helper interface. |
214 | | /// @tparam Traits Generated adapter defining the concrete message type. |
215 | | /// @return Immutable runtime descriptor binding all callbacks to `Traits`. |
216 | | template <typename Traits> |
217 | 0 | constexpr ProfileFuzzerTraits BindProfileFuzzer() { |
218 | 0 | using Hooks = ProfileFuzzerHooks<Traits>; |
219 | 0 | if constexpr (Traits::kProfile == TargetProfile::kTiming) { |
220 | 0 | return {Traits::kProfile, &Hooks::CustomMutator, &Hooks::CustomCrossOver, &LoadProfileInput<Traits>, |
221 | 0 | &ProbeTimingMutationHelpers<Traits>}; |
222 | 0 | } |
223 | 0 | return {Traits::kProfile, &Hooks::CustomMutator, &Hooks::CustomCrossOver, &LoadProfileInput<Traits>, nullptr}; |
224 | 0 | } Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastTelnetTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastFtpTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastSmtpTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::HttpsH2Traits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastTftpTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastWebSocketTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastDictTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::DeepHttpTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastIpfsTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastHttpsTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastImapTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastGopherTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastFileTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::TimingTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastPop3Traits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::MultiTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastHttp3Traits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::CompatibilityTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::ResolverTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::ProxyTransportTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastHttp2Traits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastHttpTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::ApiTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastLdapTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastRtspTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastMqttTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::FastSecureWebSocketTraits>() Unexecuted instantiation: proto_fuzzer::ProfileFuzzerTraits proto_fuzzer::BindProfileFuzzer<proto_fuzzer::generated::H2ProxyTraits>() |
225 | | |
226 | | } // namespace proto_fuzzer |
227 | | |
228 | | #endif // PROTO_FUZZER_PROFILE_FUZZER_H_ |