Skip to content

TypedPython: an impure function calling a compiled function with a class parameter crashes cgen instead of compiling or skipping #275

Closed

Description

@b-re-w

Repro: fresh(a, n) does c = Cell(None, None); seta(c, a) where seta(c: Cell, v) is compiled. frontend and verify accept fresh (impure, may_deopt=False, verify.py:1011 uses exact_of: c is new-only Cell), but cgen _can_deopt (cgen.py:393, also :822) treats any non-redo Call to a callee with a Param.cls parameter as deopting, so the whole module fails with CGenError.

To decide: is the callee's entry class guard really unfailing here on 3.15t (another thread can modify the class between New and the call), or must verify agree with cgen and skip fresh with a reason.

Done when: the module never crashes in cgen; fresh either compiles with a proven-sound call or is skipped with a reason; a test in the pipeline tests covers it.

Activity

  1. b-re-w commented on Oct 25, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via the PR above (feat/tp-cls-guard).

  2. added a commit that references this issue on Oct 25, 2026
  3. b-re-w commented on Oct 25, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #279.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions