Skip to content

PyUnstable_GC_VisitObjects should traverse the permanent generation as well #131740

Closed
@martindemello

Description

@martindemello

Bug report

Bug description:

This function is meant to walk the heap and visit all GCable objects. It currently ignores the permanent / frozen generation, which is a problem when calling code expects to get all extant objects.

As a concrete example, the cinder JIT compiler uses this function to scan through all Python functions on the heap and try JIT compiling them. Functions that have been frozen by gc.freeze() or immortalize_heap() are not processed, and thus do not get compiled.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

Labels

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

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions