Skip to content

Facade: a record 'destroyed but never produced here' (198 records, 10 libraries) and 'produced, several unary destroyers' (21): the caller-allocated and the multi-destroyer resource #3176

Done

Description

@ehartford

Part of #3115; clusters from the #3116 survey. 198 records in 10 libraries have a destroyer and no producer in the package (xz_utils lzma_index_s, raylib GlyphInfo, …): the caller allocates them or a different function family fills them. 21 records have several unary destroyers (libxml2 _xmlRegExecCtxt), 61 functions are an 'owned return, but no single destroyer in the package' (libxml2 xmlRegNewExecCtxt), 2 records are produced with no unary destroyer (yyjson_doc: yyjson_doc_free takes it, yet is not seen). Each is a registry-fact shape (§16.2b.15) that the report should say how to write, and the yyjson case is a proof misread to find.

Activity

  1. added
    bug
    on Nov 9, 2026
  2. added 2 commits that reference this issue on Nov 9, 2026
  3. ehartford commented on Nov 9, 2026

    @ehartford
    ContributorAuthor

    #3203 (main 9388708): a record with a proven producer and a proven unary destroyer that is still no resource (curl_mime) now names the producer parameter the facade does not describe, instead of the false 'no single destroyer'. Left here: the 198 'destroyed but never produced' records and the 21 with several unary destroyers (registry-fact shapes).

  4. ehartford commented on Nov 18, 2026

    @ehartford
    ContributorAuthor

    #3434 merged: a record that is destroyed and never produced names its destroyers and the two contracts a person could state (from <fn>, or init <fn>(self) for a caller-allocated record), and a record with several unary destroyers lists them. That is the 'report should say how to write it' half.

    Left: the yyjson misread. Built from source today, yyjson_read_opts is raw as 'local doc has more than one source', and yyjson_doc_free as retaining through the allocator's free field, which fails on a cast of the record (not on memset: treating libc memset as harmless removed that reason for 54 functions in four libraries and presented nothing new, so it was not kept). Both go with the #3174 ruling on function-pointer fields.

  5. ehartford commented on Nov 24, 2026

    @ehartford
    ContributorAuthor

    Labelled human attn needed: the reporting half is done (#3434); the yyjson misread that is left goes with the function-pointer-field ruling on #3174.

  6. ehartford commented on Nov 25, 2026

    @ehartford
    ContributorAuthor

    Ruled by Eric, 2026-11-25 (answers to briefs.md).

    The yyjson misread goes with #3174, now ruled (both extensions, gated on a measuring build). This waits on #3174's implementation.

  7. added
    blocked
    and removed
    blocked
    on Nov 25, 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