Repository navigation
Conversation
added 2 commits
November 8, 2026 23:48
…roducer's error-path free no longer makes it raw
cJSON_Duplicate_rec and its kind allocate, fill, and on failure pass the
fresh local to the destroyer and return NULL. The destroyer stores its
parameter in a local while it walks, so fd_callee_retains read the sink
as retention and the producer stayed raw ('local newitem is passed to
cJSON_Delete, which retains it'; 24 + 14 functions in the #3116 survey).
A callee whose param_destroys marks the index keeps nothing: destruction
is not retention.
Fixture: conan_facade_error_path_free_test (thing_make frees on the error
path; presented as the owned producer of Thing).
…local's address
The ownership walk recorded any `&`-argument rooted at a local as the
local being stored ('f(&p): the callee may replace or keep the pointer').
`index_tree_append(&i->streams, …)` in xz's lzma_index_init is the
address of a part of what i names; the callee can neither replace nor
keep i, yet the producer stayed raw ('local i is stored or its address
taken'; 40 + 13 functions in the #3116 survey). Only a bare `&p` is
the pointer's address.
Fixture: conan_facade_error_path_free_test's `zero(&t->n)`.
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.
Fixes #3179 (part: the error-path free and the field-address cases). Two commits: fd_callee_retains returns false when the callee destroys that parameter; the ownership walk records
f(&p->field)as no store of p. Fixture conan_facade_error_path_free_test. Battery GREEN on f0023b1 (with run tools/battery.win ~/.local/with-staging/i3179, wall 331 s after a green gate and internals lane; status: GREEN BATTERY_DONE). The walking-destroyer gap the fixture exposed is #3195.