Skip to content

Modeled C: a retained pointer case of a variadic contract (case CONST: <type> retains by param N, curl CURLOPT_POSTFIELDS) is refused as not modeled #3010

Closed

Description

@ehartford

From #2950: src/SemaFacade.w refuses a retained pointer case of a variadic contract with "is not modeled yet (#1652)", and #1652 is closed. §16.3c: the caller's storage would have to outlive the resource as a C string. This issue is the open owner of that diagnostic until the case is modeled (a retains by param N whose retained value is a C string the resource keeps: the facade must state the lifetime the resource imposes, D51 §65 says never half-model).

Activity

  1. added
    spec-gap
    on Nov 3, 2026
  2. added 2 commits that reference this issue on Nov 3, 2026
  3. ehartford commented on Nov 7, 2026

    @ehartford
    ContributorAuthor

    Fixed in #3063 (57a1aed) under D194 (Eric, 2026-11-07): a retained pointer case borrows caller-managed storage (&CString, &CStr, or &[u8]/&str with length param CONST as T), held under the §16.2b.9 window and released by until, abandon or destruction; libcurl lists CURLOPT_POSTFIELDS as the sized &str case over CURLOPT_POSTFIELDSIZE_LARGE. Fixtures: behav_c_facade_retained_pointer_case.w and six err_c_facade_retained_pointer_*.w.

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

    spec-gap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions