Repository navigation
A variadic setter's store fits the callback role when it is proven to be the first argument read under its case; a facts file states a variadic function's cases (D213, #3124) - #3556
Merged
Conversation
… be the first argument read under its case; a facts file states a variadic function's cases (D213, #3124)
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
D213 as amended by Eric on 2026-11-22 after reading libcurl 8.23.0. The words are already in the spec (v7.84); this is the implementation.
The shape.
curl_easy_setopt(handle, option, ...)hands its argument list and option toCurl_vsetopt, which passes both unchanged tosetopt_func, wherecase CURLOPT_DEBUGFUNCTION: s->fdebug = va_arg(param, curl_debug_callback);stores the next argument.The rule. That store fits
field F of R is callbackwhen all of these are proven; otherwise the field is undecided and the contract says what stopped it:case Kof a switch on a parameter (the selector), at the field's own type;returnin a sibling branch does not (Curl_vsetoptreads the list in its other branches);case Kas a callback;How. The scanner records three kinds of line per function:
fv(a store of the next variadic argument: record, field, list, selector, case labels, type, first or later),vc(a call that hands on ava_list: where the list and each argument came from, and whether the list was read on the way),vk(a call of a variadic function: its constant arguments and what its first variadic argument is).ci_va_store_verdictwalks thevcedges up to the entries and judges them.Facts files.
variadic param V selected by param S:and itscase K: …lines are read and carried into the drafted contract. §31 already allowed them (facts = … item+); the reader did not. A variadic function whose cases the registry states is judged like any other function instead of being reported as unmodeled.Tests:
conan_facade_callback_variadic_test(fits; the package calls its own setter with the same field; with its own function, a contradiction; a read before the list is passed on; facts that state no case), and the older test's variadic case, whose store sits under anif.#3124 stays open for libcurl's own facts file.
Battery green (530 s); self-audit and
:release-checksgreen.