_Py_TryIncrefCompareStackRef incorrectly listed as non-escaping in cases generator
@DinoV ya está trabajando en esto.
Desde el 29/1/2025.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Bug report
Bug description:
(This came up during the faster-cpython meeting, filing a bug so we don't forget.)
_Py_TryIncrefCompareStackRef and _Py_TryIncrefCompare are currently listed as non-escaping in the bytecode cases generator (https://github.com/python/cpython/blob/99ed3025fe8fa9079b4c1eac01c5af62caa98c15/Tools/cases_generator/analyzer.py#L635), but they can in fact escape (in the DECREF path when we're no longer sure the object we INCREF'ed is a correct object, since it may have been a pointer to a new object in re-used memory). _Py_TryIncrefCompare isn't currently used in bytecodes.c, but _Py_TryIncrefCompareStackRef is used in LOAD_ATTR specializations, which are consequently incorrectly flagged as non-escaping (and also can also theoretically cause crashes because of the missing spilling).
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.