-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
DECREF_INPUTS() should be escaping #131688
Copy link
Copy link
Closed
Labels
3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtopic-JITtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtopic-JITtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Crash report
The interpreter generator doesn't set the
HAS_ESCAPES_FLAGon instructions/micro-ops that useDECREF_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:
cpython/Tools/cases_generator/analyzer.py
Lines 732 to 734 in 7c3692f
I'm not sure if it makes sense to just add a special case for
DECREF_INPUTShere, 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