curl-fuzzer C++ reference
Loading...
Searching...
No Matches
target_policy.h File Reference

Mutation policies that keep each proto fuzzer in one intentional performance and protocol lane. More...

Go to the source code of this file.

Typedefs

using proto_fuzzer::ConditionalEligibilityPruner = void (*)(curl::fuzzer::proto::Scenario*, TargetProfile)
 Generated callback that removes conditionally ineligible fields and options.

Functions

void proto_fuzzer::NormalizeScenarioForExecution (curl::fuzzer::proto::Scenario *scenario)
 Apply execution-only allocation-failure safety rules.
void proto_fuzzer::NormalizeScenarioForTarget (curl::fuzzer::proto::Scenario *scenario, TargetProfile profile, ConditionalEligibilityPruner prune_conditional_eligibility)
 Complete normalization for a loaded or mutated fixed-target Scenario.

Detailed Description

Mutation policies that keep each proto fuzzer in one intentional performance and protocol lane.

Definition in file target_policy.h.

Function Documentation

◆ NormalizeScenarioForExecution()

void proto_fuzzer::NormalizeScenarioForExecution ( curl::fuzzer::proto::Scenario * scenario)

Apply execution-only allocation-failure safety rules.

Fixed target postprocessors call this while serializing mutations; the shared runtime repeats it so the compatibility target keeps its persistent wire format while executing the same bounded, safe plan.

Parameters
scenarioParsed scenario to canonicalize in place.

Definition at line 2643 of file target_policy.cc.

◆ NormalizeScenarioForTarget()

void proto_fuzzer::NormalizeScenarioForTarget ( curl::fuzzer::proto::Scenario * scenario,
TargetProfile profile,
ConditionalEligibilityPruner prune_conditional_eligibility )

Complete normalization for a loaded or mutated fixed-target Scenario.

Besides dispatch and timing controls, fixed lanes trim repeated-field and metadata suffixes that the runtime cannot consume. WebSocket lanes also remove follow-on sockets and MIME bodies their single-upgrade driver cannot use; all remaining observable bytes, options, frames, and probes stay fuzz-controlled. Option oneofs are canonicalized before final string bounds, so repeated normalization preserves the same serialized message. The compatibility profile leaves the entire input unchanged.

Parameters
scenarioScenario to canonicalize in place.
profileTarget lane whose invariants must be restored.
prune_conditional_eligibilityGenerated profile callback, or nullptr when the caller has no conditional eligibility to apply.

Definition at line 2664 of file target_policy.cc.