|
curl-fuzzer C++ reference
|
Exercises public easy/share/query APIs while preserving all caller- owned option and callback lifetimes. More...
#include <api_lifecycle.h>
Public Member Functions | |
| ApiLifecycle (CURL *easy, const curl::fuzzer::proto::ApiPlan &plan, std::string_view url) | |
| Configure the plan's share handle and cover public error-string tables. | |
| ApiLifecycle (CURL *easy, curl::fuzzer::proto::ApiPlan &&plan, std::string_view url)=delete | |
| A temporary plan cannot satisfy the retained reference's lifetime. | |
| ~ApiLifecycle () | |
| RunScenario keeps this owner alive through easy cleanup, which releases even an incomplete connection's share reference before CleanupShare runs. | |
| void | ProbeTransferResults (bool probe_upkeep) |
| Run correctly typed CURLINFO and response-header probes selected by the plan. | |
| void | ProbeEasyDuplication () |
| Duplicate, reset, and destroy a scratch easy handle while every pointer- valued option copied from the source still has a live owner. | |
| bool | response_pause_returned () const |
| std::size_t | response_bytes_received () const |
| void | SetActiveMulti (CURLM *multi) |
| Hand the driving multi handle to the reentrancy probes so the multi-entry probes can target the live object. | |
| std::size_t | reentrant_probes_run () const |
| std::size_t | reentrant_recursive_rejections () const |
| bool | guessed_scheme_url () const |
| bool | version_info_probed () const |
| bool | https_proxy_feature_present () const |
Exercises public easy/share/query APIs while preserving all caller- owned option and callback lifetimes.
Construct this only after the easy handle has its final pre-transfer configuration. The owner must destroy the easy before this object: easy cleanup reliably releases its share reference even when an incomplete connection makes explicit detachment fail. Result and duplication probes remain explicit because they run before either teardown step.
Definition at line 34 of file api_lifecycle.h.
| proto_fuzzer::ApiLifecycle::ApiLifecycle | ( | CURL * | easy, |
| const curl::fuzzer::proto::ApiPlan & | plan, | ||
| std::string_view | url ) |
Configure the plan's share handle and cover public error-string tables.
The plan is borrowed because RunScenario keeps its source Scenario alive and unmodified for this object's complete lifetime.
| easy | Live easy handle used by explicit probes; clean it before destroying this lifecycle so its share reference is gone first. |
| plan | Bounded API plan retained by the API target policy; it must remain alive and unmodified for this lifecycle's complete lifetime. |
| url | Bounded scenario URL used by URL and escaping probes during construction; it is not retained. |
Definition at line 409 of file api_lifecycle.cc.
| bool proto_fuzzer::ApiLifecycle::guessed_scheme_url | ( | ) | const |
Definition at line 674 of file api_lifecycle.cc.
| bool proto_fuzzer::ApiLifecycle::https_proxy_feature_present | ( | ) | const |
Definition at line 680 of file api_lifecycle.cc.
| void proto_fuzzer::ApiLifecycle::ProbeEasyDuplication | ( | ) |
Duplicate, reset, and destroy a scratch easy handle while every pointer- valued option copied from the source still has a live owner.
The duplicate inherits borrowed slists and callback userdata but not the source share. Reset it immediately, then cleanup; performing it would reuse mock/request cursors and test a harness artifact instead of libcurl's duplication lifecycle.
Definition at line 731 of file api_lifecycle.cc.
| void proto_fuzzer::ApiLifecycle::ProbeTransferResults | ( | bool | probe_upkeep | ) |
Run correctly typed CURLINFO and response-header probes selected by the plan.
Call only after the transfer entrypoint has returned. The typed descriptor table suppresses duplicates whose only effect would be charging an iteration for the same immutable result. Header traversal remains unconditional in the API lane because it exposes a separate public API and is independently capped.
| probe_upkeep | True only while curl_easy_perform's internal multi remains attached and can service curl_easy_upkeep safely. |
Definition at line 690 of file api_lifecycle.cc.
| std::size_t proto_fuzzer::ApiLifecycle::reentrant_probes_run | ( | ) | const |
Definition at line 492 of file api_lifecycle.cc.
| std::size_t proto_fuzzer::ApiLifecycle::reentrant_recursive_rejections | ( | ) | const |
Definition at line 495 of file api_lifecycle.cc.
| std::size_t proto_fuzzer::ApiLifecycle::response_bytes_received | ( | ) | const |
Definition at line 482 of file api_lifecycle.cc.
| bool proto_fuzzer::ApiLifecycle::response_pause_returned | ( | ) | const |
Definition at line 479 of file api_lifecycle.cc.
| void proto_fuzzer::ApiLifecycle::SetActiveMulti | ( | CURLM * | multi | ) |
Hand the driving multi handle to the reentrancy probes so the multi-entry probes can target the live object.
Called before the drive loop starts; null in easy-only drives, where multi probes are skipped.
| multi | Live multi handle driving the transfer, or null in easy-only drives where multi probes are skipped. |
Definition at line 489 of file api_lifecycle.cc.
| bool proto_fuzzer::ApiLifecycle::version_info_probed | ( | ) | const |
Definition at line 677 of file api_lifecycle.cc.