8000 `DECREF_INPUTS()` should be escaping · Issue #131688 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

DECREF_INPUTS() should be escaping #131688

New issue

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

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

Already on GitHub? Sign in to your account

Open
brandtbucher opened this issue Mar 24, 2025 · 0 comments
Open

DECREF_INPUTS() should be escaping #131688

brandtbucher opened this issue Mar 24, 2025 · 0 comments
Assignees
Labels
3.14 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-JIT type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@brandtbucher
Copy link
Member
brandtbucher commented Mar 24, 2025

Crash report

The interpreter generator doesn't set the HAS_ESCAPES_FLAG on instructions/micro-ops that use DECREF_INPUTS(). It should, though.

I think the issue is that we short-circuit our escape check to omit calls that are all-uppercase, since these are generally non-escaping macros:

if tkn.text.upper() == tkn.text:
# simple macro
continue

I'm not sure if it makes sense to just add a special case for DECREF_INPUTS here, or omit this heuristic and manually add things that fit this pattern to the non-escaping allowlist. There may also be other surgery involved to make this work correctly, since we want to avoid extra spills and reloads around this.

Linked PRs

@brandtbucher brandtbucher added 3.14 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-JIT type-crash A hard crash of the interpreter, possibly with a core dump labels Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.14 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-JIT type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

2 participants
0