Skip to content

Facade proof: a returned record pointer unproven through 'a local is stored or its address taken' (53 functions) or 'a local has more than one source' (14) #3179

Closed

Description

@ehartford

Part of #3115; clusters from the #3116 survey: 'a local is stored or its address taken' 40 + 13 through a callee (xz_utils lzma_index_init, libarchive archive_entry_partial_links), 'a local has more than one source' 9 + 5 (sqlite3 sqlite3_str_new), 'a local is passed to a callee that retains it' 24 + 14 (sqlite3 sqlite3_value_dup, cjson cJSON_Duplicate_rec: the local is passed to the destroyer on the error path, which the proof reads as retention). The producer pattern 'allocate, fill through the pointer, return it; free it on failure' is the normal C constructor and must prove.

Activity

  1. added
    bug
    on Nov 9, 2026
  2. added a commit that references this issue on Nov 9, 2026
  3. ehartford commented on Nov 9, 2026

    @ehartford
    ContributorAuthor

    Two of the three shapes are fixed in #3196: the error-path free (fd_callee_retains is false for a destroying callee) and the address of a field of the local (f(&p->field) is no store of p). Left here: 'a local has more than one source' (sqlite3_str_new: 9 + 5 functions), and the destroyer-through-a-walking-local case that the fixture exposed is #3195. Measured again once the survey rerun on the reseeded compiler lands.

  4. added a commit that references this issue on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions