Skip to content

GC may have inconsistent view of stacktop with deferred references #118926

Description

@Fidget-Spinner

In #118450, Sam pointed out that GC can occur at any Py_DECREF. With deferred references, we will need to traverse the object's stacks. The main problem is that frame->stacktop might not represent the true stacktop at a GC collection, because frame->stacktop is not set in between opcodes.

This requires either scanning the entire stack (not just up to stacktop), or deferring GC to safe points.

Linked PRs

Activity

  1. added a commit that references this issue on Jul 9, 2024
  2. added a commit that references this issue on Jul 11, 2024
  3. added a commit that references this issue on Jul 17, 2024
  4. added a commit that references this issue on Aug 6, 2024
  5. added a commit that references this issue on Aug 7, 2024
  6. added a commit that references this issue on Aug 22, 2024
  7. added
    type-bugAn unexpected behavior, bug, or error
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    on Oct 1, 2024
  8. JacobCoffee commented on Oct 1, 2024

    @JacobCoffee
    Member

    hey @Fidget-Spinner is this good to close since the ref'd PRs are merged?

  9. Fidget-Spinner commented on Oct 1, 2024

    @Fidget-Spinner
    MemberAuthor

    Yup

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

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions