Skip to content

JIT: _Py_uop_sym_set_recorded_type may receive a non-type at trace optimization time. #148439

@Fidget-Spinner

Description

@Fidget-Spinner

Bug report

Bug description:

_Py_uop_sym_set_recorded_type asserts PyType_Check, but it's possible to have an instance change its __class__/type to a non-PyType_Check-ed class after JIT trace but right before JIT optimization time.

I think the fix is to convert that to a check instead of an assert?

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions