-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
In the maybe_freelist_push function, PyTupleObjects with an ob_size of 20 are being stored in the free_list for potential reuse. However, in the maybe_freelist_pop function, these objects aren't actually being reused.
// Objects/tupleobject.c
static inline int
maybe_freelist_push(PyTupleObject *op) {
// ....
}
static inline PyTupleObject *
maybe_freelist_pop(Py_ssize_t size) {
// ...
}I've already submitted a PR.
Here is the link to the PR: #121428
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
- GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused #121428
- [3.13] GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428) #121565
- [3.12] GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428) #121566
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error