Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

code objects remove unknown opcodes from the instruction stream when accessing co_code #128045

Open
DinoV opened this issue Dec 17, 2024 · 1 comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@DinoV
Copy link
Contributor

DinoV commented Dec 17, 2024

Bug report

Bug description:

If you construct a code object with an unknown opcode it'll get removed when the code object goes through the opcodes to de-opt them. We should just ignore unknown opcodes instead.

CPython versions tested on:

3.12, 3.14

Operating systems tested on:

Linux

Linked PRs

@DinoV DinoV added the type-bug An unexpected behavior, bug, or error label Dec 17, 2024
@picnixz picnixz added interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels Dec 17, 2024
@markshannon
Copy link
Member

Constructing a code object with an unknown opcode seems like a bug to me.

I presume this is for Cinder.
Is there a way to make this work for Cinder, without making CPython less resilient?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants