Repository navigation
Treat direct *out = p writes as out-parameter returns in facade retention proofs (closes #3175) - #3645
Merged
Conversation
…tion proofs (closes #3175)
ehartford
force-pushed
the
out-param-return-proof
branch
from
November 27, 2026 04:54
1a462a4 to
fb0a174
Compare
Contributor
Author
|
Battery and
|
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.
Implements Eric's ruling on #3175 (2026-11-25):
*out = p, notout->field = p) is recorded as an out-parameter return (outstore:<slot>:<src>) rather than an unconditionalparamstore:store (src/CImport.with).outcall:<callee>:<argmap>tagging&l<loc>,&p<pi>,p<pi>,l<loc>.CiFacadeDraft.withcomputes the joint fixed point over retention, out-parameter returns (param_out_returns), and caller aliases:&localor¶min its own frame creates an alias (retained only if the alias later escapes).&global,&h->field, or anything else marks the parameter retained.out->field = p) remain stores.*out = pstay raw.localaddr:exempts slots proven to be pure direct out-return slots (fd_out_slot_safe_for_addr).test/internals/conan_facade_out_param_return_test.withcovering all 9 cases (including¶mmatching libcurl'sdollarstring(fmt, &fmt),&local, transitive wrapper, pointer-arithmetic derived local into&global,&global,&h->saved, escaping local alias,out->saved = p, and public out-returning function staying raw).Closes #3175.