-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usage
Description
Py_DECREF()
is ubiquitous in the interpreter and in C extensions.
This is a problem for optimization, as Py_DECREF()
can deallocate objects, resulting in potentially arbitrary code execution.
Arbitrary code execution means that anything can change, undermining any analysis or assumptions that may have been made by the optimizer.
To allow us to optimize effectively, we want to defer this arbitrary code execution until a known point. We choose the eval-breaker mechanism, as this can already execute arbitrary code.
The challenge is to defer deallocation by as little as possible, and to minimize the performance impact.
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usage